Browse Source

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

hella_online_20240829
赵雪冰 6 months ago
parent
commit
845b1b2387
  1. 7
      src/api/wms/purchaseMain/index.ts
  2. 5
      src/views/login/login.vue
  3. 2
      src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts
  4. 8
      src/views/wms/basicDataManage/documentSetting/businesstype/index.vue
  5. 3
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  6. 5
      src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/customerreturnJobMain.data.ts
  7. 5
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts
  8. 5
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  9. 3
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  10. 960
      src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts
  11. 556
      src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts
  12. 762
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  13. 20
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  14. 6
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  15. 1046
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts
  16. 640
      src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts
  17. 916
      src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts
  18. 1
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
  19. 944
      src/views/wms/productionManage/productscrap/productscrapJobMain/productscrapJobMain.data.ts
  20. 681
      src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts
  21. 31
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  22. 1057
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
  23. 11
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
  24. 4
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts
  25. 12
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  26. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts
  27. 1157
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts
  28. 780
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts
  29. 6
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  30. 1207
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

7
src/api/wms/purchaseMain/index.ts

@ -72,7 +72,12 @@ export const witPurchaseMain = async (id: number) => {
} }
// 导出采购订单主 Excel // 导出采购订单主 Excel
export const exportPurchaseMain = async (params) => { export const exportPurchaseMain = async (params) => {
return await request.download({ url: `/wms/purchase-main/export-excel`, params }) if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchase-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/purchase-main/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

5
src/views/login/login.vue

@ -9,7 +9,7 @@
> >
<!-- 左上角的 logo + 系统标题 --> <!-- 左上角的 logo + 系统标题 -->
<div class="relative flex items-center "> <div class="relative flex items-center ">
<img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white_blue.png" /> <img alt="" class="mr-10px w-36px h-36px" src="@/assets/imgs/logo_white.png" />
<span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span> <span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span>
</div> </div>
<!-- 左边的背景图 + 欢迎语 --> <!-- 左边的背景图 + 欢迎语 -->
@ -33,7 +33,7 @@
class="flex items-center justify-between at-2xl:justify-end at-xl:justify-end" class="flex items-center justify-between at-2xl:justify-end at-xl:justify-end"
> >
<div class="flex items-center at-2xl:hidden at-xl:hidden"> <div class="flex items-center at-2xl:hidden at-xl:hidden">
<img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white_blue.png" /> <img alt="" class="mr-10px w-36px h-36px" src="@/assets/imgs/logo_white.png" />
<span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span> <span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span>
</div> </div>
<div class="flex items-center justify-end space-x-10px"> <div class="flex items-center justify-end space-x-10px">
@ -94,6 +94,7 @@ $prefix-cls: #{$namespace}-login;
z-index: -1; z-index: -1;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-size: cover;
// background-image: url('@/assets/svgs/login-bg.svg'); // background-image: url('@/assets/svgs/login-bg.svg');
background-image: url('@/assets/imgs/login-bg.png'); background-image: url('@/assets/imgs/login-bg.png');
background-position: center; background-position: center;

2
src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts

@ -119,6 +119,7 @@ export const Businesstype = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
multiple: true,
enterSearch: true, enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区代码', // 输入框占位文本 searchListPlaceholder: '请选择库区代码', // 输入框占位文本
@ -147,6 +148,7 @@ export const Businesstype = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
multiple: true,
enterSearch: true, enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区代码', // 输入框占位文本 searchListPlaceholder: '请选择库区代码', // 输入框占位文本

8
src/views/wms/basicDataManage/documentSetting/businesstype/index.vue

@ -324,7 +324,13 @@ const onChange = (field, value)=>{
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] if(formField == 'outAreaCodes'||formField == 'inAreaCodes'){
//
setV[formField] = val.map(item=>(item[searchField])).join(',')
}else{
setV[formField] = val[0][searchField]
}
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }

3
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

@ -765,7 +765,8 @@ const labelPrint = async (row) => {
item.width = item.table?.width || 150 item.width = item.table?.width || 150
}) })
tableObjectPrint.tableList.forEach(item=>{ tableObjectPrint.tableList.forEach(item=>{
item.fromBatch = item.batch item.downItemCode = item.itemCode
item.toBatch = item.batch
}) })
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
} }

5
src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/customerreturnJobMain.data.ts

@ -88,6 +88,11 @@ export const CustomerreturnJobMain = useCrudSchemas(
key: 'status', key: 'status',
value: '0', value: '0',
isMainValue: false isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
} }
], ],
verificationParams: [ verificationParams: [

5
src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts

@ -99,6 +99,11 @@ export const CustomerreturnRecordMain = useCrudSchemas(
key: 'status', key: 'status',
value: '0', value: '0',
isMainValue: false isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
} }
], ],
verificationParams: [ verificationParams: [

5
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -226,6 +226,11 @@ export const CustomerreturnRequestMain = useCrudSchemas(
key: 'status', key: 'status',
value: '0', value: '0',
isMainValue: false isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
} }
], ],
verificationParams: [ verificationParams: [

3
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -200,6 +200,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} }
} else { } else {
const setV = {} const setV = {}
if (formField == 'customerCode') {
setV['q1Number'] = ''
}
if(formField == 'deliverRecordNumber') { if(formField == 'deliverRecordNumber') {
setV['deliverRecordNumber'] = val[0]['number'] setV['deliverRecordNumber'] = val[0]['number']
setV['deliverPlanNumber'] = val[0]['deliverPlanNumber'] setV['deliverPlanNumber'] = val[0]['deliverPlanNumber']

960
src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts

File diff suppressed because it is too large

556
src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts

@ -1,288 +1,338 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table' import { TableColumn } from '@/types/table'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const ScrapRecordMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '单据号', {
field: 'number', label: '单据号',
sort: 'custom', field: 'number',
table: { sort: 'custom',
width: 180, table: {
fixed: 'left' width: 180,
}, fixed: 'left'
isSearch: true },
}, isSearch: true
{ },
label: '申请单号', {
field: 'requestNumber', label: '申请单号',
sort: 'custom', field: 'requestNumber',
table: { sort: 'custom',
width: 180 table: {
}, width: 180
isSearch: true },
}, isSearch: true
{ },
label: '任务单号', {
field: 'jobNumber', label: '任务单号',
sort: 'custom', field: 'jobNumber',
table: { sort: 'custom',
width: 180 table: {
}, width: 180
isSearch: true },
}, isSearch: true
{ },
label: '申请时间', {
field: 'requestTime', label: 'Q3通知单号',
formatter: dateFormatter, field: 'q3Number',
detail: { sort: 'custom',
dateFormat: 'YYYY-MM-DD HH:mm:ss' isSearch: false,
}, isDetail: true,
sort: 'custom', table: {
table: { width: 150
width: 180 },
}, form: {
form: { // labelMessage: '信息提示说明!!!',
component: 'DatePicker', componentProps: {
componentProps: { enterSearch: true,
type: 'datetime', // multiple: true,
dateFormat: 'YYYY-MM-DD HH:mm:ss', isSearchList: true, // 开启查询弹窗
valueFormat: 'x', searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
} }
}, },
}, {
{ label: '申请时间',
label: '截止时间', field: 'requestTime',
field: 'dueTime', formatter: dateFormatter,
formatter: dateFormatter, detail: {
detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss'
dateFormat: 'YYYY-MM-DD HH:mm:ss' },
}, sort: 'custom',
sort: 'custom', table: {
table: { width: 180
width: 180 },
}, form: {
form: { component: 'DatePicker',
component: 'DatePicker', componentProps: {
componentProps: { type: 'datetime',
type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss',
dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x'
valueFormat: 'x', }
} }
}, },
}, {
{ label: '截止时间',
label: '执行时间', field: 'dueTime',
field: 'executeTime', formatter: dateFormatter,
formatter: dateFormatter, detail: {
detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss'
dateFormat: 'YYYY-MM-DD HH:mm:ss' },
}, sort: 'custom',
sort: 'custom', table: {
table: { width: 180
width: 180 },
}, form: {
form: { component: 'DatePicker',
component: 'DatePicker', componentProps: {
componentProps: { type: 'datetime',
type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss',
dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x'
valueFormat: 'x', }
} }
}, },
}, {
{ label: '执行时间',
label: '生效日期', field: 'executeTime',
field: 'activeDate', formatter: dateFormatter,
formatter: dateFormatter2, detail: {
detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss'
dateFormat: 'YYYY-MM-DD' },
}, sort: 'custom',
sort: 'custom', table: {
table: { width: 180
width: 180 },
}, form: {
form: { component: 'DatePicker',
component: 'DatePicker', componentProps: {
componentProps: { type: 'datetime',
style: {width: '100%'}, dateFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'date', valueFormat: 'x'
dateFormat: 'YYYY-MM-DD', }
valueFormat: 'x',
} }
}, },
}, {
{ label: '生效日期',
label: '从仓库代码', field: 'activeDate',
field: 'fromWarehouseCode', formatter: dateFormatter2,
sort: 'custom', detail: {
table: { dateFormat: 'YYYY-MM-DD'
width: 150 },
}, sort: 'custom',
}, table: {
{ width: 180
label: '从库区类型范围', },
field: 'fromAreaTypes', form: {
dictType: DICT_TYPE.AREA_TYPE, component: 'DatePicker',
dictClass: 'string', componentProps: {
isTable: true, style: { width: '100%' },
sort: 'custom', type: 'date',
table: { dateFormat: 'YYYY-MM-DD',
width: 150 valueFormat: 'x'
}
}
}, },
}, {
{ label: '从仓库代码',
label: '从库区代码范围', field: 'fromWarehouseCode',
field: 'fromAreaCodes', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 150 }
}, },
}, {
{ label: '从库区类型范围',
label: '出库事务类型', field: 'fromAreaTypes',
field: 'outTransactionType', dictType: DICT_TYPE.AREA_TYPE,
sort: 'custom', dictClass: 'string',
table: { isTable: true,
width: 150 sort: 'custom',
table: {
width: 150
}
}, },
}, {
{ label: '从库区代码范围',
label: '入库事务类型', field: 'fromAreaCodes',
field: 'inTransactionType', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 150 }
}, },
}, {
{ label: '出库事务类型',
label: '业务类型', field: 'outTransactionType',
field: 'businessType', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 150 }
}, },
}, {
{ label: '入库事务类型',
label: '部门', field: 'inTransactionType',
field: 'departmentCode', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 150 }
}, },
}, {
{ label: '业务类型',
label: '接口类型', field: 'businessType',
field: 'interfaceType', sort: 'custom',
dictType: DICT_TYPE.INTERFACE_TYPE, table: {
dictClass: 'string', width: 150
isTable: true, }
sort: 'custom',
table: {
width: 150
}, },
}, {
{ label: '部门',
label: '备注', field: 'departmentCode',
field: 'remark', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 150 }
}, },
}, {
{ label: '接口类型',
label: '创建时间', field: 'interfaceType',
field: 'createTime', dictType: DICT_TYPE.INTERFACE_TYPE,
formatter: dateFormatter, dictClass: 'string',
detail: { isTable: true,
dateFormat: 'YYYY-MM-DD HH:mm:ss' sort: 'custom',
table: {
width: 150
}
}, },
sort: 'custom', {
table: { label: '备注',
width: 180 field: 'remark',
sort: 'custom',
table: {
width: 150
}
}, },
isTable: false, {
form: { label: '创建时间',
component: 'DatePicker', field: 'createTime',
componentProps: { formatter: dateFormatter,
type: 'datetime', detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss'
valueFormat: 'x', },
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}, },
}, {
{ label: '创建者',
label: '创建者', field: 'creator',
field: 'creator', sort: 'custom',
sort: 'custom', isTable: false,
isTable: false, table: {
table: { width: 150
width: 150 }
}, },
},
{ {
label: '最后更新时间', label: '最后更新时间',
field: 'updateTime', field: 'updateTime',
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: false,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}, },
table: { {
width: 180 label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
}, },
form: { // {
component: 'DatePicker', // label: '代码',
componentProps: { // field: 'code',
style: {width:'100%'}, // sort: 'custom',
type: 'datetime', // table: {
dateFormat: 'YYYY-MM-DD HH:mm:ss', // width: 150
valueFormat: 'x', // },
// },
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
} }
} }
}, ])
{ )
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
// {
// label: '代码',
// field: 'code',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
]))
//表单校验 //表单校验
export const ScrapRecordMainRules = reactive({ export const ScrapRecordMainRules = reactive({

762
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -1,398 +1,456 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as BalanceApi from '@/api/wms/balance' import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
import * as WarehouseApi from "@/api/wms/warehouse"; import * as WarehouseApi from '@/api/wms/warehouse'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
pageSize:10, pageSize: 10,
pageNo:1, pageNo: 1,
code:'ScrapRequest' code: 'ScrapRequest'
} }
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{} const requestsettingData = data?.list[0] || {}
// 获取当前操作人的部门 // 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table' import { TableColumn } from '@/types/table'
const userStore = useUserStore() const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到 // id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept] const userDeptArray: any = [userDept]
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ export const ScrapRequestMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '单据号', {
field: 'number', label: '单据号',
sort: 'custom', field: 'number',
table: { sort: 'custom',
width: 180, table: {
fixed: 'left' width: 180,
}, fixed: 'left'
isForm: false, },
isSearch: true, isForm: false,
}, isSearch: true
{ },
label: '状态', {
field: 'status', label: 'Q3通知单号',
dictType: DICT_TYPE.REQUEST_STATUS, field: 'q3Number',
dictClass: 'string', sort: 'custom',
isSearch: true, isSearch: false,
isForm: false, isDetail: true,
isTable: true, table: {
sort: 'custom', width: 150
table: { },
width: 150 form: {
}, // labelMessage: '信息提示说明!!!',
form: { componentProps: {
value: '1', enterSearch: true,
componentProps: { // multiple: true,
disabled: true isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
} }
}
},
{
label: '申请时间',
field: 'requestTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
}, },
form: { {
component: 'DatePicker', label: '状态',
componentProps: { field: 'status',
style: {width: '100%'}, dictType: DICT_TYPE.REQUEST_STATUS,
type: 'datetime', dictClass: 'string',
dateFormat: 'YYYY-MM-DD HH:mm:ss', isSearch: true,
valueFormat: 'x', isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
value: '1',
componentProps: {
disabled: true
}
} }
}, },
isForm: false, {
}, label: '申请时间',
{ field: 'requestTime',
label: '截止时间', formatter: dateFormatter,
field: 'dueTime', detail: {
formatter: dateFormatter, dateFormat: 'YYYY-MM-DD HH:mm:ss'
detail: { },
dateFormat: 'YYYY-MM-DD HH:mm:ss' sort: 'custom',
}, table: {
sort: 'custom', width: 180
table: { },
width: 180 form: {
}, component: 'DatePicker',
form: { componentProps: {
component: 'DatePicker', style: { width: '100%' },
componentProps: { type: 'datetime',
style: {width: '100%'}, dateFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'datetime', valueFormat: 'x'
dateFormat: 'YYYY-MM-DD HH:mm:ss', }
valueFormat: 'x', },
isForm: false
},
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}, },
}, {
{ label: '从仓库代码',
label: '从仓库代码', field: 'fromWarehouseCode',
field: 'fromWarehouseCode', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 150 },
}, isSearch: true,
isSearch: true, tableForm: {
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码',
searchField: 'code',
searchTitle: '仓库信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true, enterSearch: true,
isSearchList: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 searchListPlaceholder: '请选择仓库代码',
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code',
searchTitle: '仓库信息', // 查询弹窗标题 searchTitle: '仓库信息',
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法 searchPage: WarehouseApi.getWarehousePage,
searchCondition: [{ searchCondition: [
key: 'available', {
value: 'TRUE', key: 'available',
isMainValue: false value: 'TRUE',
}], isMainValue: false
verificationParams: [{ }
key: 'code', ],
action: '==', verificationParams: [
value: '', {
isMainValue: false, key: 'code',
isSearch: true, action: '==',
isFormModel: true, value: '',
}], // 失去焦点校验参数 isMainValue: false,
} isSearch: true,
} isFormModel: true
}, }
{ ] // 失去焦点校验参数
label: '从库区类型范围', },
field: 'fromAreaTypes', form: {
dictType: DICT_TYPE.AREA_TYPE, // labelMessage: '信息提示说明!!!',
dictClass: 'string', componentProps: {
isTable: true, enterSearch: true,
sort: 'custom', isSearchList: true, // 开启查询弹窗
table: { searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
width: 150 searchField: 'code', // 查询弹窗赋值字段
}, searchTitle: '仓库信息', // 查询弹窗标题
isSearch: true, searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
isForm: false, searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
}, searchCondition: [
{ {
label: '从库区代码范围', key: 'available',
field: 'fromAreaCodes', value: 'TRUE',
sort: 'custom', isMainValue: false
table: { }
width: 150 ],
}, verificationParams: [
isForm: false, {
}, key: 'code',
{ action: '==',
label: '业务类型', value: '',
field: 'businessType', isMainValue: false,
sort: 'custom', isSearch: true,
table: { isFormModel: true
width: 150 }
}, ] // 失去焦点校验参数
form: { }
value: 'Scrap',
componentProps: {
disabled: true
} }
}, },
isForm: false, {
}, label: '从库区类型范围',
{ field: 'fromAreaTypes',
label: '部门', dictType: DICT_TYPE.AREA_TYPE,
field: 'departmentCode', dictClass: 'string',
sort: 'custom', isTable: true,
isForm: false, sort: 'custom',
isTable:false, table: {
table: { width: 150
width: 150 },
}, isSearch: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { isForm: false
return userDeptArray.find((account) => account.id == cellValue)?.name },
}, {
form: { label: '从库区代码范围',
value: userDept.id, field: 'fromAreaCodes',
component: 'Select', sort: 'custom',
api: () => userDeptArray, table: {
componentProps: { width: 150
disabled: true, },
optionsAlias: { isForm: false
labelField: 'name', },
valueField: 'id' {
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
form: {
value: 'Scrap',
componentProps: {
disabled: true
}
},
isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm: false,
isTable: false,
table: {
width: 150
},
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userDeptArray.find((account) => account.id == cellValue)?.name
},
form: {
value: userDept.id,
component: 'Select',
api: () => userDeptArray,
componentProps: {
disabled: true,
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
} }
} }
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isTable:false,
table: {
width: 150
},
},
{
label: '自动提交',
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
}, },
form: { {
component: 'Switch', label: '备注',
value: requestsettingData.autoCommit, field: 'remark',
componentProps: { sort: 'custom',
inactiveValue: 'FALSE', isTable: false,
activeValue: 'TRUE', table: {
disable: true width: 150
} }
}
},
{
label: '自动通过',
field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
}, },
form: { {
component: 'Switch', label: '自动提交',
value: requestsettingData.autoAgree, field: 'autoCommit',
componentProps: { dictType: DICT_TYPE.TRUE_FALSE,
inactiveValue: 'FALSE', dictClass: 'string',
activeValue: 'TRUE', isTable: false,
disable: true isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disable: true
}
} }
}
},
{
label: '自动执行',
field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
}, },
form: { {
component: 'Switch', label: '自动通过',
value: requestsettingData.autoExecute, field: 'autoAgree',
componentProps: { dictType: DICT_TYPE.TRUE_FALSE,
inactiveValue: 'FALSE', dictClass: 'string',
activeValue: 'TRUE', isTable: false,
disable: true isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoAgree,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disable: true
}
} }
}
},
{
label: '直接生成记录',
field: 'directCreateRecord',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm:false,
isTable: false,
sort: 'custom',
table: {
width: 150
}, },
form: { {
component: 'Switch', label: '自动执行',
value: requestsettingData.directCreateRecord, field: 'autoExecute',
componentProps: { dictType: DICT_TYPE.TRUE_FALSE,
inactiveValue: 'FALSE', dictClass: 'string',
activeValue: 'TRUE', isTable: false,
disable: true isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoExecute,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disable: true
}
} }
}
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
}, },
form: { {
component: 'DatePicker', label: '直接生成记录',
componentProps: { field: 'directCreateRecord',
style: {width: '100%'}, dictType: DICT_TYPE.TRUE_FALSE,
type: 'datetime', dictClass: 'string',
dateFormat: 'YYYY-MM-DD HH:mm:ss', isForm: false,
valueFormat: 'x', isTable: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.directCreateRecord,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disable: true
}
} }
}, },
isTable:false, {
isForm: false, label: '创建时间',
}, field: 'createTime',
{ formatter: dateFormatter,
label: '创建者', detail: {
field: 'creator', dateFormat: 'YYYY-MM-DD HH:mm:ss'
sort: 'custom', },
table: { sort: 'custom',
width: 150 table: {
}, width: 180
isTable:false, },
isForm: false, form: {
}, component: 'DatePicker',
{ componentProps: {
label: '最后更新时间', style: { width: '100%' },
field: 'updateTime', type: 'datetime',
formatter: dateFormatter, dateFormat: 'YYYY-MM-DD HH:mm:ss',
detail: { valueFormat: 'x'
dateFormat: 'YYYY-MM-DD HH:mm:ss' }
}, },
sort: 'custom', isTable: false,
table: { isForm: false
width: 180 },
}, {
form: { label: '创建者',
component: 'DatePicker', field: 'creator',
componentProps: { sort: 'custom',
style: {width: '100%'}, table: {
type: 'datetime', width: 150
dateFormat: 'YYYY-MM-DD HH:mm:ss', },
valueFormat: 'x', isTable: false,
isForm: false
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isTable: false,
isForm: false
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 300,
fixed: 'right'
} }
}, }
isTable:false, ])
isForm: false, )
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isTable:false,
isForm: false,
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 300,
fixed: 'right'
},
}
]))
//表单校验 //表单校验
export const ScrapRequestMainRules = reactive({ export const ScrapRequestMainRules = reactive({

20
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -279,15 +279,15 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
isTable: false, isTable: false,
isForm: false, isForm: false,
}, },
{ // {
label: '备注', // label: '备注',
field: 'remark', // field: 'remark',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTable: false // isTable: false
}, // },
{ {
label: '业务类型', label: '业务类型',
field: 'businessType', field: 'businessType',
@ -599,7 +599,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
isMainValue: true isMainValue: true
}], }],
} }
}, },
tableForm:{ tableForm:{

6
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -197,9 +197,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) { if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) {
item.tableForm.max = Number(val[0]['qty']) item.tableForm.max = Number(val[0]['qty'])
} }
if(item.field == 'batch') { // if(item.field == 'batch') {
item.tableForm.disabled = false // item.tableForm.disabled = false
} // }
}) })
} }
} else if(formField == 'workStationCode') { } else if(formField == 'workStationCode') {

1046
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

File diff suppressed because it is too large

640
src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts

@ -1,321 +1,371 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
/** /**
* @returns {Array} 退 * @returns {Array} 退
*/ */
export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const ProductionscrapRecordMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '单据号', {
field: 'number', label: '单据号',
sort: 'custom', field: 'number',
table: { sort: 'custom',
width: 180, table: {
fixed: 'left' width: 180,
}, fixed: 'left'
isSearch: true },
}, isSearch: true
{ },
label: '申请单号', {
field: 'requestNumber', label: '申请单号',
sort: 'custom', field: 'requestNumber',
table: { sort: 'custom',
width: 180 table: {
}, width: 180
isSearch: true },
}, isSearch: true
{ },
label: '车间代码', {
field: 'workshopCode', label: 'Q3通知单号',
sort: 'custom', field: 'q3Number',
table: { sort: 'custom',
width: 150 isSearch: false,
}, isDetail: true,
}, table: {
{ width: 150
label: '出库事务类型', },
field: 'outTransactionType', form: {
sort: 'custom', // labelMessage: '信息提示说明!!!',
table: { componentProps: {
width: 150 enterSearch: true,
}, // multiple: true,
isTable: false, isSearchList: true, // 开启查询弹窗
}, searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
{ searchField: 'number', // 查询弹窗赋值字段
label: '入库事务类型', searchTitle: 'Q3通知单号', // 查询弹窗标题
field: 'inTransactionType', searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
sort: 'custom', searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
table: { searchCondition: [
width: 150 {
}, key: 'available',
isTable: false, value: 'TRUE',
}, isMainValue: false
{ },
label: '执行时间', {
field: 'executeTime', key: 'status',
formatter: dateFormatter, value: '0',
detail: { isMainValue: false
dateFormat: 'YYYY-MM-DD HH:mm:ss' }
}, ],
sort: 'custom', verificationParams: [
table: { {
width: 180 key: 'number',
}, action: '==',
isTable: false, value: '',
form: { isMainValue: false,
component: 'DatePicker', isSearch: true,
componentProps: { isFormModel: true
type: 'datetime', }
dateFormat: 'YYYY-MM-DD HH:mm:ss', ] // 失去焦点校验参数
valueFormat: 'x', }
} }
}, },
}, {
{ label: '车间代码',
label: '生效日期', field: 'workshopCode',
field: 'activeDate', sort: 'custom',
formatter: dateFormatter2, table: {
detail: { width: 150
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
} }
}, },
}, {
{ label: '出库事务类型',
label: '申请时间', field: 'outTransactionType',
field: 'requestTime', sort: 'custom',
formatter: dateFormatter, table: {
detail: { width: 150
dateFormat: 'YYYY-MM-DD HH:mm:ss' },
}, isTable: false
sort: 'custom', },
table: { {
width: 180 label: '入库事务类型',
}, field: 'inTransactionType',
isTable: false, sort: 'custom',
form: { table: {
component: 'DatePicker', width: 150
componentProps: { },
type: 'datetime', isTable: false
dateFormat: 'YYYY-MM-DD HH:mm:ss', },
valueFormat: 'x', {
label: '执行时间',
field: 'executeTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}, },
}, {
{ label: '生效日期',
label: '截止时间', field: 'activeDate',
field: 'dueTime', formatter: dateFormatter2,
formatter: dateFormatter, detail: {
detail: { dateFormat: 'YYYY-MM-DD'
dateFormat: 'YYYY-MM-DD HH:mm:ss' },
}, sort: 'custom',
sort: 'custom', table: {
table: { width: 180
width: 180 },
}, isTable: false,
isTable: false, form: {
form: { component: 'DatePicker',
component: 'DatePicker', componentProps: {
componentProps: { style: { width: '100%' },
type: 'datetime', type: 'date',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD',
valueFormat: 'x', valueFormat: 'x'
}
} }
}, },
}, {
{ label: '申请时间',
label: '部门', field: 'requestTime',
field: 'departmentCode', formatter: dateFormatter,
sort: 'custom', detail: {
table: { dateFormat: 'YYYY-MM-DD HH:mm:ss'
width: 150 },
}, sort: 'custom',
isTable: false, table: {
}, width: 180
{ },
label: '接口类型', isTable: false,
field: 'interfaceType', form: {
dictType: DICT_TYPE.INTERFACE_TYPE, component: 'DatePicker',
dictClass: 'string', componentProps: {
isTable: false, type: 'datetime',
sort: 'custom', dateFormat: 'YYYY-MM-DD HH:mm:ss',
table: { valueFormat: 'x'
width: 150 }
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
// {
// label: '创建者',
// field: 'creator',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: true,
// },
// {
// label: '创建时间',
// field: 'createTime',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// sort: 'custom',
// table: {
// width: 180
// },
// isTable: true,
// form: {
// component: 'DatePicker',
// componentProps: {
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// },
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
}, },
isTable: false, {
}, label: '截止时间',
{ field: 'dueTime',
label: '从库区类型范围', formatter: dateFormatter,
field: 'fromAreaTypes', detail: {
dictType: DICT_TYPE.AREA_TYPE, dateFormat: 'YYYY-MM-DD HH:mm:ss'
dictClass: 'string', },
isTable: false, sort: 'custom',
sort: 'custom', table: {
table: { width: 180
width: 150 },
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}, },
}, {
{ label: '部门',
label: '从库区代码范围', field: 'departmentCode',
field: 'fromAreaCodes', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 150 },
isTable: false
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
}, },
isTable: false, {
}, label: '业务类型',
{ field: 'businessType',
label: '到仓库代码', sort: 'custom',
field: 'toWarehouseCode', table: {
sort: 'custom', width: 150
table: { },
width: 150 isTable: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
// {
// label: '创建者',
// field: 'creator',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: true,
// },
// {
// label: '创建时间',
// field: 'createTime',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// sort: 'custom',
// table: {
// width: 180
// },
// isTable: true,
// form: {
// component: 'DatePicker',
// componentProps: {
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// },
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}, },
isTable: false, {
}, label: '最后更新者',
{ field: 'updater',
label: '到库区类型范围', isDetail: true,
field: 'toAreaTypes', isForm: false,
dictType: DICT_TYPE.AREA_TYPE, isTable: false,
dictClass: 'string', table: {
isTable: false, width: 150
sort: 'custom', }
table: {
width: 150
}, },
}, {
{ label: '从仓库代码',
label: '到库区代码范围', field: 'fromWarehouseCode',
field: 'toAreaCodes', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 150 },
isTable: false
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
}, },
isTable: false, {
}, label: '从库区代码范围',
{ field: 'fromAreaCodes',
label: '是否可用', sort: 'custom',
field: 'available', table: {
dictType: DICT_TYPE.TRUE_FALSE, width: 150
dictClass: 'string', },
isSearch: true, isTable: false
isTable: false, },
sort: 'custom', {
table: { label: '到仓库代码',
width: 150 field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '到库区类型范围',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
}, },
form: { {
component: 'Switch', label: '到库区代码范围',
value: 'TRUE', field: 'toAreaCodes',
componentProps: { sort: 'custom',
inactiveValue: 'FALSE', table: {
activeValue: 'TRUE' width: 150
},
isTable: false
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
} }
} }
}, ])
])) )
//表单校验 //表单校验
export const ProductionscrapRecordMainRules = reactive({ export const ProductionscrapRecordMainRules = reactive({

916
src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts

@ -1,486 +1,548 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as WorkshopApi from '@/api/wms/workshop' import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import * as ProductionlineApi from '@/api/wms/productionline' import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as WorkstationApi from '@/api/wms/workstation' import * as WorkstationApi from '@/api/wms/workstation'
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data'
import * as BalanceApi from '@/api/wms/balance' import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as ItempackagingApi from '@/api/wms/itempackage' import * as ItempackagingApi from '@/api/wms/itempackage'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as SupplieritemApi from '@/api/wms/supplieritem' import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table' import { TableColumn } from '@/types/table'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
pageSize:10, pageSize: 10,
pageNo:1, pageNo: 1,
code:'MaterialReturnRequest' code: 'MaterialReturnRequest'
} }
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{} const requestsettingData = data?.list[0] || {}
//console.log(34, requestsettingData) //console.log(34, requestsettingData)
const userStore = useUserStore() const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到 // id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept] const userDeptArray: any = [userDept]
/** /**
* @returns {Array} 退 * @returns {Array} 退
*/ */
export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ export const ProductionscrapRequestMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '单据号', {
field: 'number', label: '单据号',
sort: 'custom', field: 'number',
table: { sort: 'custom',
width: 180, table: {
fixed: 'left' width: 180,
}, fixed: 'left'
isForm: false, },
isSearch: true, isForm: false,
}, isSearch: true
{ },
label: '状态', {
field: 'status', label: 'Q3通知单号',
dictType: DICT_TYPE.REQUEST_STATUS, field: 'q3Number',
dictClass: 'string', sort: 'custom',
isSearch: true, isSearch: false,
isTable: true, isDetail: true,
isForm:false, table: {
sort: 'custom', width: 150
table: { },
width: 150 form: {
}, // labelMessage: '信息提示说明!!!',
form: { componentProps: {
value: '1', enterSearch: true,
componentProps: { // multiple: true,
disabled: true isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
} }
}
},
{
label: '车间',
field: 'workshopCode',
sort: 'custom',
table: {
width: 150
}, },
isSearch: true, {
form: { label: '状态',
// labelMessage: '信息提示说明!!!', field: 'status',
componentProps: { dictType: DICT_TYPE.REQUEST_STATUS,
enterSearch: true, dictClass: 'string',
isSearchList: true, // 开启查询弹窗 isSearch: true,
searchListPlaceholder: '请选择车间代码', // 输入框占位文本 isTable: true,
searchField: 'code', // 查询弹窗赋值字段 isForm: false,
searchTitle: '车间信息', // 查询弹窗标题 sort: 'custom',
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 table: {
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 width: 150
searchCondition:[{ },
key: 'available', form: {
value: 'TRUE', value: '1',
isMainValue: false componentProps: {
}], disabled: true
verificationParams: [{ }
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
} }
}, },
}, {
{ label: '车间',
label: '生产线代码', field: 'workshopCode',
field: 'productionLineCode', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 150 },
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择车间代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
}, },
form: { {
// labelMessage: '信息提示说明!!!', label: '生产线代码',
componentProps: { field: 'productionLineCode',
enterSearch: true, sort: 'custom',
isSearchList: true, // 开启查询弹窗 table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
isMainValue: true
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题 searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition:[{ searchCondition: [
key: 'available', {
value: 'TRUE', key: 'available',
isMainValue: false value: 'TRUE',
},{ isMainValue: false
key: 'workshopCode', },
value: 'workshopCode', {
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示 key: 'workshopCode',
isMainValue: true value: 'workshopCode',
}], message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
verificationParams: [{ isMainValue: true
key: 'code', }
action: '==', ]
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
} }
}, },
tableForm:{ {
isInpuFocusShow: true, label: '申请时间',
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 field: 'requestTime',
searchField: 'code', // 查询弹窗赋值字段 formatter: dateFormatter,
searchTitle: '生产线信息', // 查询弹窗标题 detail: {
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 dateFormat: 'YYYY-MM-DD HH:mm:ss'
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 },
searchCondition:[{ sort: 'custom',
key: 'available', table: {
value: 'TRUE', width: 180
isMainValue: false },
},{ isTable: false,
key: 'workshopCode', form: {
value: 'workshopCode', component: 'DatePicker',
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示 componentProps: {
isMainValue: true style: { width: '100%' },
}] type: 'datetime',
}, dateFormat: 'YYYY-MM-DD HH:mm:ss',
}, valueFormat: 'x'
{ }
label: '申请时间', },
field: 'requestTime', isForm: false
formatter: dateFormatter, },
detail: { {
dateFormat: 'YYYY-MM-DD HH:mm:ss' label: '截止时间',
}, field: 'dueTime',
sort: 'custom', formatter: dateFormatter,
table: { detail: {
width: 180 dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
isTable: false, sort: 'custom',
form: { table: {
component: 'DatePicker', width: 180
componentProps: { },
style: {width:'100%'}, isTable: false,
type: 'datetime', form: {
dateFormat: 'YYYY-MM-DD HH:mm:ss', component: 'DatePicker',
valueFormat: 'x', componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}, },
isForm: false, {
}, label: '从库区类型范围',
{ field: 'fromAreaTypes',
label: '截止时间', dictType: DICT_TYPE.AREA_TYPE,
field: 'dueTime', dictClass: 'string',
formatter: dateFormatter, isTable: false,
detail: { sort: 'custom',
dateFormat: 'YYYY-MM-DD HH:mm:ss' table: {
}, width: 150
sort: 'custom', },
table: { isForm: false
width: 180
}, },
isTable: false, {
form: { label: '到库区类型范围',
component: 'DatePicker', field: 'toAreaTypes',
componentProps: { dictType: DICT_TYPE.AREA_TYPE,
style: {width:'100%'}, dictClass: 'string',
type: 'datetime', isSearch: true,
dateFormat: 'YYYY-MM-DD HH:mm:ss', isTable: false,
valueFormat: 'x', sort: 'custom',
table: {
width: 150
},
isForm: false
},
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm: false,
table: {
width: 150
},
isTable: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userDeptArray.find((account) => account.id == cellValue)?.name
},
form: {
value: userDept.id,
component: 'Select',
api: () => userDeptArray,
componentProps: {
disabled: true,
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
}
} }
}, },
}, {
{ label: '自动提交',
label: '从库区类型范围', field: 'autoCommit',
field: 'fromAreaTypes', dictType: DICT_TYPE.TRUE_FALSE,
dictType: DICT_TYPE.AREA_TYPE, dictClass: 'string',
dictClass: 'string', isTable: false,
isTable: false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isForm: false, form: {
}, component: 'Switch',
{ value: requestsettingData.autoCommit,
label: '到库区类型范围', componentProps: {
field: 'toAreaTypes', inactiveValue: 'FALSE',
dictType: DICT_TYPE.AREA_TYPE, activeValue: 'TRUE',
dictClass: 'string', disabled: true
isSearch: true,
isTable: false,
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false,
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false,
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false,
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false,
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm:false,
table: {
width: 150
},
isTable: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userDeptArray.find((account) => account.id == cellValue)?.name
},
form: {
value: userDept.id,
component: 'Select',
api: () => userDeptArray,
componentProps: {
disabled: true,
optionsAlias: {
labelField: 'name',
valueField: 'id'
} }
} }
}
},
{
label: '自动提交',
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm:false,
sort: 'custom',
table: {
width: 150
}, },
form: { {
component: 'Switch', label: '自动通过',
value: requestsettingData.autoCommit, field: 'autoAgree',
componentProps: { dictType: DICT_TYPE.TRUE_FALSE,
inactiveValue: 'FALSE', dictClass: 'string',
activeValue: 'TRUE', isTable: false,
disabled: true, isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoAgree,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
} }
}
},
{
label: '自动通过',
field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm:false,
sort: 'custom',
table: {
width: 150
}, },
form: { {
component: 'Switch', label: '自动执行',
value: requestsettingData.autoAgree, field: 'autoExecute',
componentProps: { dictType: DICT_TYPE.TRUE_FALSE,
inactiveValue: 'FALSE', dictClass: 'string',
activeValue: 'TRUE', isTable: false,
disabled: true, isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoExecute,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
} }
}
},
{
label: '自动执行',
field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm:false,
sort: 'custom',
table: {
width: 150
}, },
form: { {
component: 'Switch', label: '直接生成记录',
value: requestsettingData.autoExecute, field: 'directCreateRecord',
componentProps: { dictType: DICT_TYPE.TRUE_FALSE,
inactiveValue: 'FALSE', dictClass: 'string',
activeValue: 'TRUE', isForm: false,
disabled: true, isTable: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.directCreateRecord,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
} }
}
},
{
label: '直接生成记录',
field: 'directCreateRecord',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm: false,
isTable: false,
sort: 'custom',
table: {
width: 150
}, },
form: { {
component: 'Switch', label: '创建时间',
value: requestsettingData.directCreateRecord, field: 'createTime',
componentProps: { formatter: dateFormatter,
inactiveValue: 'FALSE', detail: {
activeValue: 'TRUE', dateFormat: 'YYYY-MM-DD HH:mm:ss'
disabled: true, },
} sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isTable: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 300,
fixed: 'right'
},
isTable: false
} }
}, ])
{ )
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isTable: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 300,
fixed: 'right'
},
isTable: false,
}
]))
//表单校验 //表单校验
export const ProductionscrapRequestMainRules = reactive({ export const ProductionscrapRequestMainRules = reactive({

1
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts

@ -174,6 +174,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch:true,
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择生产线代码', searchListPlaceholder: '请选择生产线代码',
searchField: 'code', searchField: 'code',

944
src/views/wms/productionManage/productscrap/productscrapJobMain/productscrapJobMain.data.ts

File diff suppressed because it is too large

681
src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts

@ -1,348 +1,397 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const ProductscrapRecordMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '单据号', {
field: 'number', label: '单据号',
sort: 'custom', field: 'number',
table: { sort: 'custom',
width: 180, table: {
fixed: 'left' width: 180,
}, fixed: 'left'
isSearch: true },
}, isSearch: true
{ },
label: '申请单号', {
field: 'requestNumber', label: '申请单号',
sort: 'custom', field: 'requestNumber',
table: { sort: 'custom',
width: 180 table: {
}, width: 180
isSearch: true },
}, isSearch: true
{ },
label: '状态', {
field: 'status', label: 'Q3通知单号',
dictType: DICT_TYPE.REQUEST_STATUS, field: 'q3Number',
dictClass: 'string', sort: 'custom',
isForm:false, isSearch: false,
isTable: false, isDetail: true,
sort: 'custom', table: {
table: { width: 150
width: 150 },
}, form: {
}, // labelMessage: '信息提示说明!!!',
{ componentProps: {
label: '车间', enterSearch: true,
field: 'workshopCode', // multiple: true,
sort: 'custom', isSearchList: true, // 开启查询弹窗
table: { searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
width: 150 searchField: 'number', // 查询弹窗赋值字段
} searchTitle: 'Q3通知单号', // 查询弹窗标题
}, searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
{ searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
label: '生产线', searchCondition: [
field: 'productionLineCode', {
sort: 'custom', key: 'available',
table: { value: 'TRUE',
width: 150 isMainValue: false
} },
}, {
{ key: 'status',
label: '班组', value: '0',
field: 'team', isMainValue: false
sort: 'custom', }
table: { ],
width: 150 verificationParams: [
} {
}, key: 'number',
{ action: '==',
label: '班次', value: '',
field: 'shift', isMainValue: false,
sort: 'custom', isSearch: true,
table: { isFormModel: true
width: 150 }
} ] // 失去焦点校验参数
}, }
{
label: '任务单号',
field: 'jobNumber',
sort: 'custom',
table: {
width: 180,
show:false
},
isTable: false,
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '执行时间',
field: 'executeTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
}, {
{ label: '状态',
label: '生效日期', field: 'status',
field: 'activeDate', dictType: DICT_TYPE.REQUEST_STATUS,
formatter: dateFormatter2, dictClass: 'string',
detail: { isForm: false,
dateFormat: 'YYYY-MM-DD' isTable: false,
}, sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
} }
}, },
}, {
{ label: '车间',
label: '申请时间', field: 'workshopCode',
field: 'requestTime', sort: 'custom',
formatter: dateFormatter, table: {
detail: { width: 150
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
}, {
{ label: '生产线',
label: '截止时间', field: 'productionLineCode',
field: 'dueTime', sort: 'custom',
formatter: dateFormatter, table: {
detail: { width: 150
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
}, {
{ label: '班组',
label: '部门', field: 'team',
field: 'departmentCode', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 150 }
},
isTable: false,
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
}, },
isTable: false, {
}, label: '班次',
{ field: 'shift',
label: '创建者', sort: 'custom',
field: 'creator', table: {
sort: 'custom', width: 150
table: { }
width: 150
}, },
isTable: true, {
}, label: '任务单号',
{ field: 'jobNumber',
label: '创建时间', sort: 'custom',
field: 'createTime', table: {
formatter: dateFormatter, width: 180,
detail: { show: false
dateFormat: 'YYYY-MM-DD HH:mm:ss' },
isTable: false
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '执行时间',
field: 'executeTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}, },
sort: 'custom', {
table: { label: '生效日期',
width: 180 field: 'activeDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x'
}
}
}, },
isTable: true, {
form: { label: '申请时间',
component: 'DatePicker', field: 'requestTime',
componentProps: { formatter: dateFormatter,
type: 'datetime', detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss'
valueFormat: 'x', },
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}, },
}, {
{ label: '截止时间',
label: '最后更新时间', field: 'dueTime',
field: 'updateTime', formatter: dateFormatter,
sort: 'custom', detail: {
isDetail: true, dateFormat: 'YYYY-MM-DD HH:mm:ss'
isForm: false, },
isTable: false, sort: 'custom',
formatter: dateFormatter, table: {
detail: { width: 180
dateFormat: 'YYYY-MM-DD HH:mm:ss' },
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}, },
table: { {
width: 180 label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
}, },
form: { {
component: 'DatePicker', label: '业务类型',
componentProps: { field: 'businessType',
style: {width:'100%'}, sort: 'custom',
type: 'datetime', table: {
dateFormat: 'YYYY-MM-DD HH:mm:ss', width: 150
valueFormat: 'x', },
isTable: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTable: true
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
// {
// label: '代码',
// field: 'code',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150,
show: false
}, },
isTable: false, {
}, label: '最后更新时间',
{ field: 'updateTime',
label: '从库区类型范围', sort: 'custom',
field: 'fromAreaTypes', isDetail: true,
dictType: DICT_TYPE.AREA_TYPE, isForm: false,
dictClass: 'string', isTable: false,
isTable: false, formatter: dateFormatter,
sort: 'custom', detail: {
table: { dateFormat: 'YYYY-MM-DD HH:mm:ss'
width: 150 },
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}, },
}, {
{ label: '最后更新者',
label: '从库区代码范围', field: 'updater',
field: 'fromAreaCodes', isDetail: true,
sort: 'custom', isForm: false,
table: { isTable: false,
width: 150 table: {
width: 150
}
}, },
isTable: false, // {
}, // label: '代码',
{ // field: 'code',
label: '是否可用', // sort: 'custom',
field: 'available', // table: {
dictType: DICT_TYPE.TRUE_FALSE, // width: 150
dictClass: 'string', // },
isSearch: true, // },
isTable: false, {
sort: 'custom', label: '从仓库代码',
table: { field: 'fromWarehouseCode',
width: 150 sort: 'custom',
table: {
width: 150,
show: false
},
isTable: false
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
}, },
form: { {
component: 'Switch', label: '从库区代码范围',
value: 'TRUE', field: 'fromAreaCodes',
componentProps: { sort: 'custom',
inactiveValue: 'FALSE', table: {
activeValue: 'TRUE' width: 150
},
isTable: false
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
} }
} }
}, ])
])) )
//表单校验 //表单校验
export const ProductscrapRecordMainRules = reactive({ export const ProductscrapRecordMainRules = reactive({

31
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -97,6 +97,8 @@
@searchTableSuccess="searchTableBomSuccess" @searchTableSuccess="searchTableBomSuccess"
:footButttondata="footButttondata" :footButttondata="footButttondata"
@footButtonClick="buttonBaseClickBom" @footButtonClick="buttonBaseClickBom"
@inputNumberChange="inputNumberChange"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -229,13 +231,18 @@ const banchBomPage = async (fromLocationCode,item) => {
} }
// tableform // tableform
const buttonOperationClick = async (row, label, index)=> { const buttonOperationClick = async (row, label, index,isSave = false)=> {
console.log('buttonOperationClick',row, label, index)
if (row.itemCode == '') { if (row.itemCode == '') {
message.warning('请选择物料代码!') if(!isSave){
message.warning('请选择物料代码!')
}
return return
} }
if(row.qty <= 0){ if(row.qty <= 0){
message.warning('数量需要大于0!') if(!isSave){
message.warning('数量需要大于0!')
}
return return
} }
detatableDataBom.params.itemCode = row.itemCode detatableDataBom.params.itemCode = row.itemCode
@ -244,7 +251,7 @@ const buttonOperationClick = async (row, label, index)=> {
bomModelVisible.value = true bomModelVisible.value = true
await getDetailListBom() await getDetailListBom()
console.log(row.fromLocationCode); console.log(row.fromLocationCode);
detatableDataBom.tableList.forEach(async item => { detatableDataBom.tableList.forEach(async (item) => {
console.log(333,item) console.log(333,item)
ProdcutscrapBomScrap.allSchemas.tableFormColumns.map((bomItem) => { ProdcutscrapBomScrap.allSchemas.tableFormColumns.map((bomItem) => {
if (bomItem.field == 'batch') { if (bomItem.field == 'batch') {
@ -277,7 +284,11 @@ const buttonOperationClick = async (row, label, index)=> {
const obj = await banchBomPage(row.fromLocationCode, item) const obj = await banchBomPage(row.fromLocationCode, item)
item.batch = obj.batch item.batch = obj.batch
}) })
detailBomRef.value.open('create', row, null,'viewDetail')// if(isSave){
buttonBaseClickBom('save')
}else{
detailBomRef.value.open('create', row, null,'viewDetail')//
}
} }
// //
@ -358,10 +369,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
console.log(res) console.log(res)
if(res?.list?.length>0){ if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version row['bomVersion'] = res.list[0].version
buttonOperationClick(row,'Bom',tableData.value.indexOf(row),true)
} }
}) })
}else if(formField == 'bomVersion'){ }else if(formField == 'bomVersion'){
row['bomVersion'] = val[0]['version'] row['bomVersion'] = val[0]['version']
buttonOperationClick(row,'Bom',tableData.value.indexOf(row),true)
} else { } else {
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} }
@ -699,12 +713,14 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){ if(data.masterId){
data.id = data.masterId data.id = data.masterId
} }
console.log('tableData.value',tableData.value)
data.subList = tableData.value // data.subList = tableData.value //
// bom // bom
let childListRs = true let childListRs = true
// //
tableData.value.forEach((item) => { tableData.value.forEach((item) => {
if (!item.childList) { if (!item.childList||item.childList.length==0) {
childListRs = false childListRs = false
} }
item.productionLineCode = data.productionLineCode item.productionLineCode = data.productionLineCode
@ -763,6 +779,9 @@ const inputNumberChange = (field, index, row, val) => {
if(field == 'qty' || field == 'singlePrice'){ if(field == 'qty' || field == 'singlePrice'){
row.amount = row.qty * row.singlePrice row.amount = row.qty * row.singlePrice
} }
if(field == 'qty'){
buttonOperationClick(row,'Bom',index,true)
}
} }
const qtyOnChange = (field,val) =>{ const qtyOnChange = (field,val) =>{

1057
src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

File diff suppressed because it is too large

11
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue

@ -206,6 +206,15 @@ const isShowMainButton = (row,val) => {
} }
} }
//
const isShowSourceTypeButton = (row) => {
if (row.sourceType == 'EDI' || row.sourceType == 'ASN_ExternalReceipt') {
return true
} else {
return false
}
}
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
@ -227,7 +236,7 @@ const butttondata = (row,$index) => {
hasPermi: 'wms:purchasereceipt-job-main:refusal', hasPermi: 'wms:purchasereceipt-job-main:refusal',
link: true // link: true //
}, },
defaultButtons.mainListPlanCheckQualityReportBtn({}), // defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), //
] ]
} }

4
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

@ -86,12 +86,12 @@ export const PurchasereceiptJobMain = useCrudSchemas(
width: 150 width: 150
}, },
form: { form: {
value: 'ASN_ExternalReceipt',
componentProps: { componentProps: {
disabled: true disabled: true
} }
}, },
isSearch: false, isSearch: true,
sortTableDefault: 5
}, },
{ {
label: '运输方式', label: '运输方式',

12
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -164,6 +164,15 @@ const buttonBaseClick = (val, item) => {
} }
} }
//
const isShowSourceTypeButton = (row) => {
if (row.sourceType == 'EDI' || row.sourceType == 'ASN_ExternalReceipt') {
return true
} else {
return false
}
}
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
@ -173,7 +182,8 @@ const butttondata = (row,$index) => {
return [ return [
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),// defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),//
defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), // //defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), //
defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), //
] ]
} }

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts

@ -124,12 +124,12 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
form: { form: {
value: 'ASN_ExternalReceipt',
componentProps: { componentProps: {
disabled: true disabled: true
} }
}, },
isSearch: false, isSearch: false,
isTable:false
}, },
{ {
label: '车牌号', label: '车牌号',

1157
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts

File diff suppressed because it is too large

780
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts

@ -1,387 +1,439 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as InspectionQ2Api from '@/api/qms/inspectionQ2'
import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data'
/** /**
* @returns {Array} 退 * @returns {Array} 退
*/ */
export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const PurchasereturnRecordMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '单据号', {
field: 'number', label: '单据号',
sort: 'custom', field: 'number',
table: { sort: 'custom',
width: 180, table: {
fixed: 'left' width: 180,
}, fixed: 'left'
sortTableDefault: 1012, },
sortSearchDefault:1, sortTableDefault: 1012,
isSearch: true sortSearchDefault: 1,
}, isSearch: true
{ },
label: '申请单号', {
field: 'requestNumber', label: '申请单号',
sort: 'custom', field: 'requestNumber',
table: { sort: 'custom',
width: 180 table: {
}, width: 180
isTable: false },
}, isTable: false
{ },
label: '任务单号', {
field: 'jobNumber', label: '任务单号',
sort: 'custom', field: 'jobNumber',
table: { sort: 'custom',
width: 180 table: {
}, width: 180
isTable: false },
}, isTable: false
{ },
label: '采购收货记录单号', {
field: 'purchaseReceiptRecordNumber', label: '采购收货记录单号',
sort: 'custom', field: 'purchaseReceiptRecordNumber',
table: { sort: 'custom',
width: 180 table: {
}, width: 180
isSearch: true, },
sortTableDefault: 3, isSearch: true,
sortSearchDefault: 5, sortTableDefault: 3,
}, { sortSearchDefault: 5
label: 'qad采购退货记录单号', },
field: 'qadPurchaseReturnRecordCode', {
sort: 'custom', label: 'qad采购退货记录单号',
table: { field: 'qadPurchaseReturnRecordCode',
width: 180 sort: 'custom',
}, table: {
sortSearchDefault:3, width: 180
sortTableDefault: 4, },
isTable: true sortSearchDefault: 3,
}, sortTableDefault: 4,
{ isTable: true
label: '发货单号', },
field: 'asnNumber', {
sort: 'custom', label: '发货单号',
table: { field: 'asnNumber',
width: 180 sort: 'custom',
}, table: {
sortSearchDefault:3, width: 180
isSearch: true, },
sortTableDefault: 2 sortSearchDefault: 3,
}, isSearch: true,
{ sortTableDefault: 2
label: '要货计划单号', },
field: 'ppNumber', {
sort: 'custom', label: '要货计划单号',
table: { field: 'ppNumber',
width: 180 sort: 'custom',
}, table: {
isTable: false width: 180
}, },
{ isTable: false
label: '供应商代码', },
field: 'supplierCode', {
sort: 'custom', label: 'Q2通知单号',
table: { field: 'q2Number',
width: 150 sort: 'custom',
}, isSearch: false,
sortTableDefault: 1, isDetail: true,
sortSearchDefault:2, sortTableDefault: 4,
isSearch: true table: {
}, width: 150
{ },
label: '从月台代码', form: {
field: 'fromDockCode', // labelMessage: '信息提示说明!!!',
sort: 'custom', componentProps: {
table: { enterSearch: true,
width: 150 // multiple: true,
}, isSearchList: true, // 开启查询弹窗
isTable: false searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本
}, searchField: 'number', // 查询弹窗赋值字段
{ searchTitle: 'Q2通知单号', // 查询弹窗标题
label: '承运商', searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类
field: 'carrierCode', searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法
sort: 'custom', searchCondition: [
table: { {
width: 150 key: 'available',
}, value: 'TRUE',
isTable: false isMainValue: false
}, },
{ {
label: '运输方式', key: 'status',
field: 'transferMode', value: '0',
sort: 'custom', isMainValue: false
table: { }
width: 150 ],
}, verificationParams: [
isTable: false {
}, key: 'number',
{ action: '==',
label: '车牌号', value: '',
field: 'vehiclePlateNumber', isMainValue: false,
sort: 'custom', isSearch: true,
table: { isFormModel: true
width: 150 }
}, ] // 失去焦点校验参数
isTable: false }
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
},
{
label: '到库区类型范围',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '执行时间',
field: 'executeTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
}, {
{ label: '供应商代码',
label: '生效日期', field: 'supplierCode',
field: 'activeDate', sort: 'custom',
formatter: dateFormatter2, table: {
detail: { width: 150
dateFormat: 'YYYY-MM-DD' },
}, sortTableDefault: 1,
sort: 'custom', sortSearchDefault: 2,
table: { isSearch: true
width: 180 },
}, {
isTable: false, label: '从月台代码',
form: { field: 'fromDockCode',
component: 'DatePicker', sort: 'custom',
componentProps: { table: {
style: {width: '100%'}, width: 150
type: 'date', },
dateFormat: 'YYYY-MM-DD', isTable: false
valueFormat: 'x', },
{
label: '承运商',
field: 'carrierCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '运输方式',
field: 'transferMode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '车牌号',
field: 'vehiclePlateNumber',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
} }
}, },
}, {
{ label: '到库区类型范围',
label: '申请时间', field: 'toAreaTypes',
field: 'requestTime', dictType: DICT_TYPE.AREA_TYPE,
formatter: dateFormatter, dictClass: 'string',
detail: { isTable: false,
dateFormat: 'YYYY-MM-DD HH:mm:ss' sort: 'custom',
}, table: {
sort: 'custom', width: 150
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
}, {
{ label: '从库区代码范围',
label: '截止时间', field: 'fromAreaCodes',
field: 'dueTime', sort: 'custom',
formatter: dateFormatter, table: {
detail: { width: 150
dateFormat: 'YYYY-MM-DD HH:mm:ss' },
}, isTable: false
sort: 'custom', },
table: { {
width: 180 label: '到库区代码范围',
}, field: 'toAreaCodes',
isTable: false, sort: 'custom',
form: { table: {
component: 'DatePicker', width: 150
componentProps: { },
type: 'datetime', isTable: false
dateFormat: 'YYYY-MM-DD HH:mm:ss', },
valueFormat: 'x', {
label: '执行时间',
field: 'executeTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}, },
}, {
{ label: '生效日期',
label: '部门', field: 'activeDate',
field: 'departmentCode', formatter: dateFormatter2,
sort: 'custom', detail: {
table: { dateFormat: 'YYYY-MM-DD'
width: 150 },
}, sort: 'custom',
isTable: false, table: {
}, width: 180
// { },
// label: '代码', isTable: false,
// field: 'code', form: {
// sort: 'custom', component: 'DatePicker',
// table: { componentProps: {
// width: 150 style: { width: '100%' },
// }, type: 'date',
// }, dateFormat: 'YYYY-MM-DD',
{ valueFormat: 'x'
label: '接口类型', }
field: 'interfaceType', }
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}, },
}, {
// { label: '申请时间',
// label: '原因', field: 'requestTime',
// field: 'available', formatter: dateFormatter,
// sort: 'custom', detail: {
// table: { dateFormat: 'YYYY-MM-DD HH:mm:ss'
// width: 150 },
// }, sort: 'custom',
// isTable: true, table: {
// }, width: 180
{ },
label: '创建时间', isTable: false,
field: 'createTime', form: {
formatter: dateFormatter, component: 'DatePicker',
detail: { componentProps: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}, },
sort: 'custom', {
table: { label: '截止时间',
width: 180 field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}, },
isTable: true, {
form: { label: '部门',
component: 'DatePicker', field: 'departmentCode',
componentProps: { sort: 'custom',
type: 'datetime', table: {
dateFormat: 'YYYY-MM-DD HH:mm:ss', width: 150
valueFormat: 'x', },
isTable: false
},
// {
// label: '代码',
// field: 'code',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
} }
}, },
}, {
{ label: '业务类型',
label: '创建者', field: 'businessType',
field: 'creator', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
width: 150 },
isTable: false
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
}, },
isTable: false, // {
}, // label: '原因',
{ // field: 'available',
label: '操作', // sort: 'custom',
field: 'action', // table: {
isDetail: false, // width: 150
isForm: false, // },
table: { // isTable: true,
width: 150, // },
fixed: 'right' {
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}, },
} {
])) label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
])
)
//表单校验 //表单校验
export const PurchasereturnRecordMainRules = reactive({ export const PurchasereturnRecordMainRules = reactive({

6
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -308,6 +308,12 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
} }
} else { } else {
const setV = {} const setV = {}
if (formField == 'supplierCode') {
setV['q2Number'] = ''
}
if (formField == 'q2Number') {
setV['q2Number'] = val[0]['number']
}
if (formField == 'purchaseReceiptRecordNumber') { if (formField == 'purchaseReceiptRecordNumber') {
// isShowButton.value = false // isShowButton.value = false
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]

1207
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

File diff suppressed because it is too large
Loading…
Cancel
Save