Browse Source

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

master_hella_20240701
zhousq 7 months ago
parent
commit
963ba4c6a8
  1. 37
      .env.test-scp
  2. 7
      Dockerfile_scp
  3. 1
      README.md
  4. 53
      nginx_scp.conf
  5. 6
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  6. 5
      src/api/system/mail/template/index.ts
  7. 5
      src/api/system/notify/template/index.ts
  8. 5
      src/api/system/sms/smsTemplate/index.ts
  9. 73
      src/api/wms/relegateRequest/index.ts
  10. 65
      src/api/wms/saleShipmentDetail/index.ts
  11. 64
      src/api/wms/saleShipmentMain/index.ts
  12. 6
      src/api/wms/supplierinvoiceRequestMain/index.ts
  13. 34
      src/components/Annex/src/Annex.vue
  14. 5
      src/components/BasicForm/src/BasicForm.vue
  15. 13
      src/components/Detail/src/Detail.vue
  16. 18
      src/components/Form/src/Form.vue
  17. 60
      src/components/PreviewPDF/index.vue
  18. 17
      src/components/SearchTable/src/SearchTable.vue
  19. 2
      src/components/UploadFile/src/UploadFile.vue
  20. 152
      src/locales/en-US.ts
  21. 76
      src/locales/zh-CN.ts
  22. 146
      src/utils/disposition/defaultButtons.ts
  23. 11
      src/utils/formatter.ts
  24. 133
      src/views/qms/basicDataManage/selectedProject/selectedProject.data.ts
  25. 0
      src/views/qms/counter/counter.data.ts
  26. 0
      src/views/qms/counter/index.vue
  27. 0
      src/views/qms/dynamicRule/dynamicRule.data.ts
  28. 0
      src/views/qms/dynamicRule/index.vue
  29. 0
      src/views/qms/inspectionJob/addForm.vue
  30. 0
      src/views/qms/inspectionJob/detail.vue
  31. 2
      src/views/qms/inspectionJob/index.vue
  32. 0
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  33. 0
      src/views/qms/inspectionRecord/addForm.vue
  34. 0
      src/views/qms/inspectionRecord/detail.vue
  35. 0
      src/views/qms/inspectionRecord/index.vue
  36. 0
      src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
  37. 0
      src/views/qms/inspectionRequest/index.vue
  38. 16
      src/views/qms/inspectionRequest/inspectionRequestMain.data.ts
  39. 14
      src/views/qms/inspectionScheme/addForm.vue
  40. 0
      src/views/qms/inspectionScheme/index.vue
  41. 0
      src/views/qms/inspectionScheme/inspectionScheme.data.ts
  42. 0
      src/views/qms/inspectionStage/index.vue
  43. 0
      src/views/qms/inspectionStage/inspectionStage.data.ts
  44. 4
      src/views/qms/inspectionTemplate/addForm.vue
  45. 0
      src/views/qms/inspectionTemplate/index.vue
  46. 0
      src/views/qms/inspectionTemplate/inspectionTemplate.data.ts
  47. 10
      src/views/qms/selectedProject/index.vue
  48. 81
      src/views/qms/selectedProject/selectedProject.data.ts
  49. 102
      src/views/qms/selectedSet/index.vue
  50. 0
      src/views/qms/selectedSet/selectedSet.data.ts
  51. 108
      src/views/system/messageSet/index.vue
  52. 213
      src/views/system/messageSet/messageSet.data.ts
  53. 2
      src/views/system/tableActionRel/tableActionRel.data.ts
  54. 233
      src/views/wms/basicDataManage/itemManage/relegateRequest/index.vue
  55. 243
      src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequest.data.ts
  56. 2
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  57. 18
      src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts
  58. 348
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
  59. 463
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts
  60. 969
      src/views/wms/moveManage/inventorymove/inventorymoveJobMain/inventorymoveJobMain.data.ts
  61. 459
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/inventorymoveRecordMain.data.ts
  62. 3
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  63. 664
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts
  64. 1
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  65. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts
  66. 38
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  67. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  68. 10
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  69. 9
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  70. 96
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

37
.env.test-scp

@ -0,0 +1,37 @@
# 生产环境
NODE_ENV=test
VITE_DEV=false
# 请求路径
VITE_BASE_URL='http://dev.ccwin-in.com:25400/api'
# 上传路径
VITE_UPLOAD_URL='http://dev.ccwin-in.com:25400/api/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=
# 接口地址
VITE_API_URL=/admin-api
# 是否删除debugger
VITE_DROP_DEBUGGER=true
# 是否删除console.log
VITE_DROP_CONSOLE=true
# 是否sourcemap
VITE_SOURCEMAP=false
# 打包路径
VITE_BASE_PATH=/
# 输出路径
VITE_OUT_DIR=sfms3.0
# 自定义接口路径
VITE_INTERFACE_URL='http://dev.ccwin-in.com:25311/magic/web/index.html'
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25311'

7
Dockerfile_scp

@ -0,0 +1,7 @@
# 设置基础镜像
FROM win-nginx
WORKDIR /opt/sfms3.0
COPY nginx_scp.conf /usr/local/nginx/conf/nginx.conf
# 将dist文件中的内容复制到 /opt/sfms3.0 这个目录下面
COPY sfms3.0/ /opt/sfms3.0

1
README.md

@ -7,6 +7,7 @@ form: {
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题 searchTitle: '生产线物料关系信息', // 查询弹窗标题
hiddenFilterButton:true,//是否隐藏筛选按钮
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{

53
nginx_scp.conf

@ -0,0 +1,53 @@
user root;
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
charset utf-8,gbk;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$request_time $upstream_response_time"';
access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 600s;
client_max_body_size 200m;
gzip on;
gzip_min_length 10k;
gzip_comp_level 9;
gzip_buffers 4 16k;
gzip_types text/plain application/javascript text/css application/xml text/javascript image/jpeg image/gif image/png;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
upstream sfms3.0 {
server localhost:25311 weight=10 max_fails=3 fail_timeout=10s;
}
server {
listen 25400;
server_name_in_redirect off;
server_name _;
location /api/ {
proxy_pass http://sfms3.0/;
proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header;
proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
}
location /profile/ {
alias /opt/profile/;
index index.html index.htm;
}
location / {
try_files $uri $uri/ /index.html;
root /opt/sfms3.0;
index index.html index.htm;
}
}
}

6
src/api/qms/inspectionJob/inspectionJobMain/index.ts

@ -22,6 +22,11 @@ export const createInspectionJobMain = async (data) => {
return await request.post({ url: `/qms/inspection-job-main/create`, data }) return await request.post({ url: `/qms/inspection-job-main/create`, data })
} }
// 暂存检验任务
export const stagingInspectionJobMain = async (data) => {
return await request.post({ url: `/qms/inspection-job-main/staging`, data })
}
// 修改检验任务 // 修改检验任务
export const updateInspectionJobMain = async (data) => { export const updateInspectionJobMain = async (data) => {
return await request.put({ url: `/qms/inspection-job-main/update`, data }) return await request.put({ url: `/qms/inspection-job-main/update`, data })
@ -46,6 +51,7 @@ export const abandonInspectionJobMain = async (id) => {
export const closeInspectionJobMain = async (id) => { export const closeInspectionJobMain = async (id) => {
return await request.put({ url: `/qms/inspection-job-main/close?id=` + id }) return await request.put({ url: `/qms/inspection-job-main/close?id=` + id })
} }
// 导出检验申请 Excel // 导出检验申请 Excel
export const exportInspectionJobMain = async (params) => { export const exportInspectionJobMain = async (params) => {
return await request.download({ url: `/qms/inspection-job-main/export-excel`, params }) return await request.download({ url: `/qms/inspection-job-main/export-excel`, params })

5
src/api/system/mail/template/index.ts

@ -48,3 +48,8 @@ export const deleteMailTemplate = async (id: number) => {
export const sendMail = (data: MailSendReqVO) => { export const sendMail = (data: MailSendReqVO) => {
return request.post({ url: '/system/mail-template/send-mail', data }) return request.post({ url: '/system/mail-template/send-mail', data })
} }
// 查询邮件模版列表不分页
export const getMailTemplateNoPage = async (params: PageParam) => {
return await request.get({ url: '/system/mail-template/noPage', params })
}

5
src/api/system/notify/template/index.ts

@ -52,3 +52,8 @@ export const deleteNotifyTemplate = async (id: number) => {
export const sendNotify = (data: NotifySendReqVO) => { export const sendNotify = (data: NotifySendReqVO) => {
return request.post({ url: '/system/notify-template/send-notify', data }) return request.post({ url: '/system/notify-template/send-notify', data })
} }
// 查询站内信模板列表不分页
export const getNotifyTemplateNoPage = async (params: PageParam) => {
return await request.get({ url: '/system/notify-template/noPage', params })
}

5
src/api/system/sms/smsTemplate/index.ts

@ -62,3 +62,8 @@ export const exportSmsTemplate = (params) => {
export const sendSms = (data: SendSmsReqVO) => { export const sendSms = (data: SendSmsReqVO) => {
return request.post({ url: '/system/sms-template/send-sms', data }) return request.post({ url: '/system/sms-template/send-sms', data })
} }
// 查询待发送列表
export const getSmsTemplateNoPage = (data: SendSmsReqVO) => {
return request.get({ url: '/system/sms-template/noPage', data })
}

73
src/api/wms/relegateRequest/index.ts

@ -0,0 +1,73 @@
import request from '@/config/axios'
export interface RelegateRequestVO {
id: number
itemCode: string
downItemCode: string
businessType: string
uom: string
qty: number
fromBatch: string
fromPackingNumber: string
fromLocationCode: string
fromAreaTypes: string
fromAreaCodes: string
fromWarehouseCode: string
toPackingNumber: string
toBatch: string
toLocationCode: string
toWarehouseCode: string
toAreaTypes: string
toAreaCodes: string
number: string
available: string
remark: string
departmentCode: string
siteId: number
extraProperties: string
status: string
concurrencyStamp: number
serialNumber: string
ruleUserId: number
}
// 查询物料降级信息列表
export const getRelegateRequestPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/relegate-request/senior', data })
} else {
return await request.get({ url: `/wms/relegate-request/page`, params })
}
}
// 查询物料降级信息详情
export const getRelegateRequest = async (id: number) => {
return await request.get({ url: `/wms/relegate-request/get?id=` + id })
}
// 新增物料降级信息
export const createRelegateRequest = async (data: RelegateRequestVO) => {
return await request.post({ url: `/wms/relegate-request/create`, data })
}
// 修改物料降级信息
export const updateRelegateRequest = async (data: RelegateRequestVO) => {
return await request.put({ url: `/wms/relegate-request/update`, data })
}
// 删除物料降级信息
export const deleteRelegateRequest = async (id: number) => {
return await request.delete({ url: `/wms/relegate-request/delete?id=` + id })
}
// 导出物料降级信息 Excel
export const exportRelegateRequest = async (params) => {
return await request.download({ url: `/wms/relegate-request/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/relegate-request/get-import-template' })
}

65
src/api/wms/saleShipmentDetail/index.ts

@ -0,0 +1,65 @@
import request from '@/config/axios'
export interface SaleShipmentDetailVO {
id: number
soNumber: string
soLine: string
fromOwnerCode: string
packingNumber: string
batch: string
inventoryStatus: string
fromLocationCode: string
masterId: number
number: string
itemCode: string
itemName: string
itemDesc1: string
itemDesc2: string
projectCode: string
qty: number
uom: string
remark: string
concurrencyStamp: string
siteId: number
}
// 查询销售发运申请子列表
export const getSaleShipmentDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/sale-shipment-detail/senior', data })
} else {
return await request.get({ url: `/wms/sale-shipment-detail/page`, params })
}
}
// 查询销售发运申请子详情
export const getSaleShipmentDetail = async (id: number) => {
return await request.get({ url: `/wms/sale-shipment-detail/get?id=` + id })
}
// 新增销售发运申请子
export const createSaleShipmentDetail = async (data: SaleShipmentDetailVO) => {
return await request.post({ url: `/wms/sale-shipment-detail/create`, data })
}
// 修改销售发运申请子
export const updateSaleShipmentDetail = async (data: SaleShipmentDetailVO) => {
return await request.put({ url: `/wms/sale-shipment-detail/update`, data })
}
// 删除销售发运申请子
export const deleteSaleShipmentDetail = async (id: number) => {
return await request.delete({ url: `/wms/sale-shipment-detail/delete?id=` + id })
}
// 导出销售发运申请子 Excel
export const exportSaleShipmentDetail = async (params) => {
return await request.download({ url: `/wms/sale-shipment-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/sale-shipment-detail/get-import-template' })
}

64
src/api/wms/saleShipmentMain/index.ts

@ -0,0 +1,64 @@
import request from '@/config/axios'
export interface SaleShipmentMainVO {
id: number
customerCode: string
number: string
businessType: string
remark: string
extraProperties: string
siteId: number
invoiceTime: Date
requestTime: Date
dueTime: Date
departmentCode: string
status: string
autoCommit: string
autoAgree: string
autoExecute: string
directCreateRecord: string
concurrencyStamp: string
ruleUserId: number
serialNumber: string
}
// 查询销售发运申请主列表
export const getSaleShipmentMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/sale-shipment-main-request/senior', data })
} else {
return await request.get({ url: `/wms/sale-shipment-main-request/page`, params })
}
}
// 查询销售发运申请主详情
export const getSaleShipmentMain = async (id: number) => {
return await request.get({ url: `/wms/sale-shipment-main-request/get?id=` + id })
}
// 新增销售发运申请主
export const createSaleShipmentMain = async (data: SaleShipmentMainVO) => {
return await request.post({ url: `/wms/sale-shipment-main-request/create`, data })
}
// 修改销售发运申请主
export const updateSaleShipmentMain = async (data: SaleShipmentMainVO) => {
return await request.put({ url: `/wms/sale-shipment-main-request/update`, data })
}
// 删除销售发运申请主
export const deleteSaleShipmentMain = async (id: number) => {
return await request.delete({ url: `/wms/sale-shipment-main-request/delete?id=` + id })
}
// 导出销售发运申请主 Excel
export const exportSaleShipmentMain = async (params) => {
return await request.download({ url: `/wms/sale-shipment-main-request/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/sale-shipment-main-request/get-import-template' })
}

6
src/api/wms/supplierinvoiceRequestMain/index.ts

@ -124,3 +124,9 @@ export const exportSupplierinvoiceRequestDetail = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' }) return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' })
} }
// 根据角色编码获取用户列表
export const queryUserInfoByRoleCode = async (params) => {
return await request.get({ url: `/wms/supplierinvoice-request-main/queryUserInfoByRoleCodePage`, params })
}

34
src/components/Annex/src/Annex.vue

@ -3,7 +3,7 @@
<div class="annex"> <div class="annex">
<div class="title flex items-center"> <div class="title flex items-center">
<!-- <div class="title-txt">附件</div> --> <!-- <div class="title-txt">附件</div> -->
<UploadFile :isShowFile="false" :isShowTip="false" title="添加附件" :upData="upData" :limit="10" <UploadFile :isShowFile="false" :isShowTip="false" :fileType="fileType" title="添加附件" :upData="upData" :limit="10"
@update:modelValue="handleAnnexSuccess" v-if="annexData.annexList.length<5"/> @update:modelValue="handleAnnexSuccess" v-if="annexData.annexList.length<5"/>
</div> </div>
<div class="list"> <div class="list">
@ -16,17 +16,20 @@
<div>{{ item.size }}KB</div> <div>{{ item.size }}KB</div>
<div>来自 {{ item.nickname }}</div> <div>来自 {{ item.nickname }}</div>
</div> </div>
<Icon icon="ep:download" v-if="showDownload" class="cursor-pointer mr-2" size="18" @click="downFile(item)" /> <Icon icon="ep:picture" v-if="showPreview" class="cursor-pointer mr-2" :size="18" @click="preview(item)"/>
<Icon icon="ep:delete" class="cursor-pointer" v-if="!hiddenDelete" size="18" @click="deleteAnnex(item.id)" /> <Icon icon="ep:download" v-if="showDownload" class="cursor-pointer mr-2" :size="18" @click="downFile(item)" />
<Icon icon="ep:delete" class="cursor-pointer" v-if="!hiddenDelete" :size="18" @click="deleteAnnex(item.id)" />
</div> </div>
<div class="time mt-6px ">{{ formatDate(item.createTime) }}</div> <div class="time mt-6px ">{{ formatDate(item.createTime) }}</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<PreviewPDF ref="previewRef" />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import PreviewPDF from '@/components/PreviewPDF/index.vue'
import UploadFile from '@/components/UploadFile/src/UploadFile.vue' import UploadFile from '@/components/UploadFile/src/UploadFile.vue'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as FileApi from '@/api/wms/file' import * as FileApi from '@/api/wms/file'
@ -45,6 +48,17 @@ const props = defineProps({
type: Object, type: Object,
required: true required: true
}, },
fileType:{
type:Array,
required: false,
default: () => {
return ['apk','doc', 'xls', 'ppt', 'txt', 'pdf','png', 'jpg', 'jpeg']
}
},
showPreview: {
type: Boolean,
required: false
},
showDownload: { showDownload: {
type: Boolean, type: Boolean,
required: false required: false
@ -55,7 +69,7 @@ const props = defineProps({
}, },
}) })
// emit // emit
const emit = defineEmits(['handleAnnexSuccess', 'deleteAnnexSuccess']) const emit = defineEmits(['handleAnnexSuccess', 'deleteAnnexSuccess','previewAnnexHandle'])
// //
const handleAnnexSuccess = () => { const handleAnnexSuccess = () => {
emit('handleAnnexSuccess') emit('handleAnnexSuccess')
@ -75,6 +89,18 @@ const deleteAnnex = async (id) => {
const downFile = (item)=>{ const downFile = (item)=>{
window.open(import.meta.env.VITE_BASE_URL + '/admin-api/infra/file/0/get/' + item.path) window.open(import.meta.env.VITE_BASE_URL + '/admin-api/infra/file/0/get/' + item.path)
} }
const previewRef = ref<InstanceType<typeof PreviewPDF>>()
const preview = (item)=>{
console.log('preview==',item)
if(item.url.endsWith('.pdf')){
previewRef.value?.openPreview(item.url)
}else{
let imageArray = props.annexData.annexList.map(item=>item.url)
imageArray = imageArray.filter(item=>!item.endsWith('.pdf'))
previewRef.value?.openPreview(imageArray)
}
}
</script> </script>

5
src/components/BasicForm/src/BasicForm.vue

@ -15,6 +15,7 @@
:schema="formSchema" :schema="formSchema"
:is-col="true" :is-col="true"
@opensearchTable="opensearchTable" @opensearchTable="opensearchTable"
@hiddenFilterButton="hiddenSearchTableFilterButton"
@clearSearchInput="clearSearchInput" @clearSearchInput="clearSearchInput"
@onChange="onChange" @onChange="onChange"
@onBlur="onBlur" @onBlur="onBlur"
@ -433,7 +434,9 @@ const opensearchTable = (
searchDetailSchemas searchDetailSchemas
) )
} }
const hiddenSearchTableFilterButton = ()=>{
searchTableRef.value.hiddenFilterButton()
}
const clearSearchInput = (field)=>{ const clearSearchInput = (field)=>{
emit('clearSearchInput',field) emit('clearSearchInput',field)
} }

13
src/components/Detail/src/Detail.vue

@ -103,6 +103,8 @@
<ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}"> <ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label==annexItem.label" <Annex v-show="tabsList[current].label==annexItem.label"
:annexData="annexItem" :annexData="annexItem"
:fileType="annexItem.fileType"
:showPreview="annexItem.showPreview"
:showDownload = "annexItem.showDownload" :showDownload = "annexItem.showDownload"
:hiddenDelete = "annexItem.hiddenDelete" :hiddenDelete = "annexItem.hiddenDelete"
@handleAnnexSuccess="updateAnnexTableHandle" @handleAnnexSuccess="updateAnnexTableHandle"
@ -223,6 +225,7 @@ const props = defineProps({
default: ()=>({ default: ()=>({
label: '附件', label: '附件',
showDownload:false, showDownload:false,
showPreview:false,
hiddenDelete:false hiddenDelete:false
}) })
}, },
@ -460,10 +463,14 @@ const getFileList = async () => {
} }
} }
// //
const getAnnexFileList = async (row:id) => { const getAnnexFileList = async (row) => {
console.log('getAnnexFileList')
props.annexTable?.forEach(async (item) => { props.annexTable?.forEach(async (item) => {
let requstData = {...remarksData.data,tableName: item?.tableName} let requstData = {...remarksData.data,tableName: item?.tableName}
if(item?.queryParams){
item?.queryParams?.forEach(queryItem => {
requstData[queryItem.queryField] = row[queryItem.rowField]
});
}
const annexList = await FileApi.getFileList(requstData) const annexList = await FileApi.getFileList(requstData)
const annexData = annexTableData.value.find(annex=>annex.label === item.label) const annexData = annexTableData.value.find(annex=>annex.label === item.label)
if(annexData){ if(annexData){
@ -476,6 +483,8 @@ const getAnnexFileList = async (row:id) => {
annexList, annexList,
hasSubDetail:item.hasSubDetail||false, hasSubDetail:item.hasSubDetail||false,
subDetailTableData:item.subDetailTableData, subDetailTableData:item.subDetailTableData,
fileType:item.fileType||['apk','doc', 'xls', 'ppt', 'txt', 'pdf','png', 'jpg', 'jpeg'],
showPreview:item.showPreview||false, //
showDownload:item.showDownload||false, // showDownload:item.showDownload||false, //
hiddenDelete:item.hiddenDelete || false, // hiddenDelete:item.hiddenDelete || false, //
}) })

18
src/components/Form/src/Form.vue

@ -55,7 +55,7 @@ export default defineComponent({
vLoading: propTypes.bool.def(false), vLoading: propTypes.bool.def(false),
labelPosition: propTypes.string.def('left'), labelPosition: propTypes.string.def('left'),
}, },
emits: ['register','opensearchTable','clearSearchInput', 'onChange', 'onBlur','onEnter'], emits: ['register','opensearchTable','clearSearchInput', 'onChange', 'onBlur','onEnter','hiddenFilterButton'],
setup(props, { slots, expose, emit }) { setup(props, { slots, expose, emit }) {
// element form // element form
const elFormRef = ref<ComponentRef<typeof ElForm>>() const elFormRef = ref<ComponentRef<typeof ElForm>>()
@ -278,7 +278,14 @@ export default defineComponent({
item?.componentProps?.multiple, item?.componentProps?.multiple,
item?.componentProps?.isConcatDetailSchemas, item?.componentProps?.isConcatDetailSchemas,
item?.componentProps?.searchDetailSchemas, item?.componentProps?.searchDetailSchemas,
)}}/> )
//
if(item?.componentProps?.hiddenFilterButton){
emit('hiddenFilterButton')
}
}}/>
</> </>
) )
} }
@ -316,7 +323,12 @@ export default defineComponent({
item?.componentProps?.multiple, item?.componentProps?.multiple,
item?.componentProps?.isConcatDetailSchemas, item?.componentProps?.isConcatDetailSchemas,
item?.componentProps?.searchDetailSchemas, item?.componentProps?.searchDetailSchemas,
)}}/> )
//
if(item?.componentProps?.hiddenFilterButton){
emit('hiddenFilterButton')
}
}}/>
</> </>
) )
} }

60
src/components/PreviewPDF/index.vue

@ -0,0 +1,60 @@
<template>
<el-dialog class="preview" v-model="showDialog" style="" @close="closeView">
<iframe v-if="isPDF" ref="pdfRef" width="100%" :height="frameHeight" :src="pdfUrl" frameborder="0"></iframe>
<el-carousel justify="center" v-else indicator-position="outside">
<el-carousel-item class="carousel-item" v-for="url in imageArray" :key="url">
<el-image style="height:100%" fit="contain" :src="url" loading="lazy" />
</el-carousel-item>
</el-carousel>
</el-dialog>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const showDialog = ref(false) //
const message = useMessage() //
const isPDF = ref(false) // pdf
const pdfUrl = ref<string>('') // pdf
const pdfRef = ref() // pdf
const frameHeight = ref(0)
const imageArray = ref<string[]>([]) //
const closeView = () => {
showDialog.value = false
}
//
const openPreview = async (data:string[]|string)=>{
showDialog.value = true
if(Array.isArray(data)){
//
isPDF.value = false
pdfUrl.value = ''
imageArray.value = data.filter(item=>(item.replace('/get/','/show/')))
}else{
isPDF.value = true
pdfUrl.value = data.replace('/get/','/show/')
nextTick(()=>{
frameHeight.value = window.innerHeight - 2*pdfRef.value.getBoundingClientRect().top
})
}
}
defineExpose({openPreview})
</script>
<style>
/* .preview .el-dialog__headerbtn .el-dialog__close{
color: white !important;
font-size: 20px !important;
}
.preview.el-dialog {
--el-dialog-box-shadow:null;
} */
</style>
<style lang="scss" scoped>
.carousel-item{
display: flex;
justify-content: center;
align-items: center;
}
</style>

17
src/components/SearchTable/src/SearchTable.vue

@ -50,9 +50,9 @@ const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
// //
const HeadButttondata = [ const HeadButttondata = ref([
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
] ])
/** 打开弹窗 */ /** 打开弹窗 */
const getListRef = ref() const getListRef = ref()
@ -70,6 +70,9 @@ const multipleBol = ref(false)
const searchConditionRef = ref() const searchConditionRef = ref()
const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any) => { const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any) => {
HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null), //
]
dialogTitle.value = titleName dialogTitle.value = titleName
tableObjectRef.value = tableObject tableObjectRef.value = tableObject
searchDialogVisible.value = true searchDialogVisible.value = true
@ -79,6 +82,10 @@ const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any
tableColumns.value = allSchemas.tableColumns tableColumns.value = allSchemas.tableColumns
} }
const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any,isConcatDetailSchemas=false,detailSchemas: any) => { const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any,isConcatDetailSchemas=false,detailSchemas: any) => {
HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null), //
]
searchDialogVisible.value = true searchDialogVisible.value = true
formFieldRef.value = formField formFieldRef.value = formField
searchFieldRef.value = searchField searchFieldRef.value = searchField
@ -112,6 +119,10 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
getList() getList()
} }
const hiddenFilterButton = ()=>{
HeadButttondata.value = []
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
console.log(99, rowRef.value) console.log(99, rowRef.value)
@ -153,7 +164,7 @@ const searchFormClick = (searchData) => {
getListRef.value() // getListRef.value() //
} }
defineExpose({ open,openData }) // open defineExpose({ open,openData,hiddenFilterButton }) // open
// Table ref // Table ref
const searchTableRef = ref() const searchTableRef = ref()

2
src/components/UploadFile/src/UploadFile.vue

@ -56,7 +56,7 @@ const props = defineProps({
title: propTypes.string.def('文件上传'), title: propTypes.string.def('文件上传'),
updateUrl: propTypes.string.def(import.meta.env.VITE_UPLOAD_URL), updateUrl: propTypes.string.def(import.meta.env.VITE_UPLOAD_URL),
upData: propTypes.object.def(), upData: propTypes.object.def(),
fileType: propTypes.array.def(['apk','doc', 'xls', 'ppt', 'txt', 'pdf', 'pdf','png', 'jpg', 'jpeg']), // , ['png', 'jpg', 'jpeg'] fileType: propTypes.array.def(['apk','doc', 'xls', 'ppt', 'txt', 'pdf','png', 'jpg', 'jpeg']), // , ['png', 'jpg', 'jpeg']
fileSize: propTypes.number.def(5), // (MB) fileSize: propTypes.number.def(5), // (MB)
limit: propTypes.number.def(5), // limit: propTypes.number.def(5), //
autoUpload: propTypes.bool.def(true), // autoUpload: propTypes.bool.def(true), //

152
src/locales/en-US.ts

@ -668,13 +668,149 @@ export default {
:'Price', :'Price',
:'Order Date', :'Order Date',
:'Line Number', :'Line Number',
:'Operations', :'Operation',
:'Measuring Unit', :'Measuring Unit',
// ------ :'RMB',
// 客户代码:'Customer Code', :'Dollar',
:'Version Number',
}, :'Publish Time',
btn:{ :'Start Time',
:'Finish Time',
:'Business Type',
:'Forecast time type',
:'Forecast Date',
:'Order Line',
:'Planned Quantity',
:'Last update time',
:'Last Updater',
:'Demand plan',
:'Request number',
:'Code from the repository',
:'to the repository code',
:'to the dock code',
:'Time window',
:'Scheduled arrival time',
:'Carriers',
:'Shipping method',
:'License plate number',
:'The type of outbound transaction',
:'Inbound transaction type',
:'Execution time',
:'Application timeline',
:'Deadline',
:'department',
:'Interface type',
:'Package number',
:'Order number',
:'Order quantity',
:'quantity',
:'Packing quantity',
:'The quantity measured by the supplier',
:'vendor',
:'From the location code',
:'to the location code',
:'From the bin location group code',
:'to the bin location group code',
:'Code from the depot',
:'to the depot code',
:'Code from the shipper',
:'Shipper code',
:'See other packaging formats',
:'Packing specifications',
:'Document printing',
:'Itemized list',
:'No data yet',
:'supplier Shipping Request',
:'Query Field',
:'Measuring UnitSupplier batchDate of production',
:'Production Date',
:'Number of shipments',
:'Primary data',
:'Cargo Plan Bill Number',
:'Contact name',
:'Contact phone',
:'Contact email',
:'Supplier shipments Repository code',
:'Shipping method License plate number',
:'Auto-submit',
:'Automatically passed',
:'Automated',
:'Generate records directly',
:'Details',
:'Batch',
:'Date of manufacture',
:'Arrival date',
:'Expiration date',
:'Supplier unit of measure',
:'Conversion rate',
:'Material Name',
1:'Material Description1',
2:'Material Description2',
:'Item Code',
:'Quality inspection details',
:'Add Attachment',
:'Please enter a comment',
:'Changelog',
:'Add details',
:'Upload quality report',
:'Upload the quality inspection report',
:'Supplier lots',
:'piece',
:'sheet',
:'gram',
:'kg',
:'ton',
:'rice',
:'square metre',
:'Generate labels',
:'Create a label',
1:'Packing Specification 1',
2:'Package Specification 2',
1:'Package Quantity1',
2:'Package Quantity2',
:'Item packaging information',
:'System prompts',
:'Do you generate labels for this data?',
:'Do you process the selected data?',
:'shipments',
:'Package number',
:'Label information',
:'Purchase receipt records',
:'Form data',
:'Task ticket number',
ERP单据号:'ERP document number',
:'Inspection requisition number',
:'Purchase order number',
:'The name of the item',
:'Data source',
:'From the range of reservoir types',
:'to the depot type range',
:'From the range of depot codes',
:'to the range of codes in the reservoir',
:'Effective Date',
:'Receipt details',
:'Out-of-stock details',
:'Row type',
:'The quantity received',
:'to the batch',
:'From the package number',
:'to the package number',
:'Inventory status',
:'From the bin location group',
:'to the bin location group',
:'From the reservoir area',
:'to the reservoir area',
:'from the owner of the goods',
:'to the owner of the goods',
退:'Purchase return records',
:'Purchase receipt record number',
qad采购退货记录单号:'QAD purchase return record number',
:'From the dock code',
:'Cause',
退:'Number of returns',
:'unit',
:'amount',
:'Customer Code',
:'Query', :'Query',
:'Reset', :'Reset',
:'Add', :'Add',
@ -685,15 +821,11 @@ export default {
:'Settings', :'Settings',
:'Confirm', :'Confirm',
:'Cancel', :'Cancel',
:'Operations',
:'Edit', :'Edit',
:'Delete', :'Delete',
:'Add Attachment',
:'Add Filter', :'Add Filter',
:'Close',
:'Open', :'Open',
:'Save', :'Save',
:'Punblish',
//-------- //--------
// 单据打印:'Document Print', // 单据打印:'Document Print',
// 上传质量报告:'Upload Quality Report', // 上传质量报告:'Upload Quality Report',

76
src/locales/zh-CN.ts

@ -675,9 +675,73 @@ export default {
:'行号', :'行号',
:'操作', :'操作',
:'计量单位', :'计量单位',
:'人民币',
:'美元',
:'版本号',
:'发布时间',
:'开始时间',
:'结束时间',
:'业务类型',
:'预测时间类型',
:'预测日期',
:'订单行',
:'计划数量',
:'最后更新时间',
:'最后更新者',
:'要货计划',
:'申请单号',
:'从仓库代码',
:'到仓库代码',
:'到月台代码',
:'时间窗口',
:'计划到货时间',
:'承运商',
:'运输方式',
:'车牌号',
:'出库事务类型',
:'入库事务类型',
:'执行时间',
:'申请时间',
:'截止时间',
:'部门',
:'接口类型',
:'包装号',
:'订单号',
:'订单数量',
:'数量',
:'包装数量',
:'供应商计量数量',
:'供应商',
}, :'从库位代码',
btn:{ :'到库位代码',
:'从库位组代码',
:'到库位组代码',
:'从库区代码',
:'到库区代码',
:'从货主代码',
:'到货主代码',
:'查看其他包装规格',
:'包装规格',
:'单据打印',
:'明细列表',
:'暂无数据',
:'供应商发货申请',
:'查询字段',
:'供应商批次',
:'生产日期',
:'发货数量',
:'主数据',
:'要货计划单号',
:'联系人姓名',
:'联系人电话',
:'联系人电子邮件',
:'供应商发货仓库代码',
:'运输方式车牌号',
:'自动提交',
:'自动通过',
:'自动执行',
:'直接生成记录',
:'查询', :'查询',
:'重置', :'重置',
:'新增', :'新增',
@ -688,15 +752,12 @@ export default {
:'设置', :'设置',
:'确定', :'确定',
:'取消', :'取消',
:'操作',
:'编辑', :'编辑',
:'删除', :'删除',
:'添加附件', :'添加附件',
:'添加筛选条件', :'添加筛选条件',
:'关闭', :'打开',
:'关闭', :'保存',
:'关闭',
:'发布',
////// //////
:'启用', :'启用',
:'禁用', :'禁用',
@ -716,7 +777,6 @@ export default {
:'打印标签', :'打印标签',
:'批量打印', :'批量打印',
:'生成采购收货申请', :'生成采购收货申请',
:'单据打印',
:'发送到货检验申请', :'发送到货检验申请',
:'生成采购上架申请', :'生成采购上架申请',
:'生成盘点调整申请', :'生成盘点调整申请',

146
src/utils/disposition/defaultButtons.ts

@ -9,7 +9,7 @@ const { t } = useI18n()
// 新增按钮 // 新增按钮
export function defaultAddBtn(option:any) { export function defaultAddBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.新增`).replace('btn.', ''), label: t(`ts.新增`).replace('ts.', ''),
name: 'add', name: 'add',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -22,7 +22,7 @@ export function defaultAddBtn(option:any) {
// 导入按钮 // 导入按钮
export function defaultImportBtn(option:any) { export function defaultImportBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.导入`).replace('btn.', ''), label: t(`ts.导入`).replace('ts.', ''),
name: 'import', name: 'import',
hide: false, hide: false,
type: 'warning', type: 'warning',
@ -35,7 +35,7 @@ export function defaultImportBtn(option:any) {
// 导出按钮 // 导出按钮
export function defaultExportBtn(option:any) { export function defaultExportBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.导出`).replace('btn.', ''), label: t(`ts.导出`).replace('ts.', ''),
name: 'export', name: 'export',
hide: false, hide: false,
type: 'success', type: 'success',
@ -79,7 +79,7 @@ export function defaultExportBtn(option:any) {
// 刷新按钮 // 刷新按钮
export function defaultFreshBtn(option:any) { export function defaultFreshBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.刷新`).replace('btn.', ''), label: t(`ts.刷新`).replace('ts.', ''),
name: 'refresh', name: 'refresh',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -93,7 +93,7 @@ export function defaultFreshBtn(option:any) {
// 重置按钮 // 重置按钮
export function defaultResetBtn(option:any) { export function defaultResetBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.重置`).replace('btn.', ''), label: t(`ts.重置`).replace('ts.', ''),
name: 'reset', name: 'reset',
hide: false, hide: false,
type: 'info', type: 'info',
@ -107,7 +107,7 @@ export function defaultResetBtn(option:any) {
// 字段设置 // 字段设置
export function defaultSetBtn(option:any) { export function defaultSetBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.设置`).replace('btn.', ''), label: t(`ts.设置`).replace('ts.', ''),
name: 'set', name: 'set',
hide: false, hide: false,
type: 'info', type: 'info',
@ -121,7 +121,7 @@ export function defaultSetBtn(option:any) {
// 筛选按钮 // 筛选按钮
export function defaultFilterBtn(option:any) { export function defaultFilterBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.筛选`).replace('btn.', ''), label: t(`ts.筛选`).replace('ts.', ''),
name: 'filtrate', name: 'filtrate',
hide: false, hide: false,
type: 'info', type: 'info',
@ -135,7 +135,7 @@ export function defaultFilterBtn(option:any) {
// 筛选——查询按钮 // 筛选——查询按钮
export function defaultSearchBtn(option:any) { export function defaultSearchBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.搜索`).replace('btn.', ''), label: t(`ts.搜索`).replace('ts.', ''),
name: 'search', name: 'search',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -149,7 +149,7 @@ export function defaultSearchBtn(option:any) {
// 筛选——重置按钮 // 筛选——重置按钮
export function defaultSearchResetBtn(option:any) { export function defaultSearchResetBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.重置`).replace('btn.', ''), label: t(`ts.重置`).replace('ts.', ''),
name: 'searchReset', name: 'searchReset',
hide: false, hide: false,
type: 'info', type: 'info',
@ -163,7 +163,7 @@ export function defaultSearchResetBtn(option:any) {
// form表单-保存按钮 // form表单-保存按钮
export function formSaveBtn(option:any) { export function formSaveBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.保存`).replace('btn.', ''), label: t(`ts.保存`).replace('ts.', ''),
name: 'save', name: 'save',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -177,7 +177,7 @@ export function formSaveBtn(option:any) {
// form表单-关闭按钮 // form表单-关闭按钮
export function formCloseBtn(option:any) { export function formCloseBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.关闭`).replace('btn.', ''), label: t(`ts.关闭`).replace('ts.', ''),
name: 'close', name: 'close',
hide: false, hide: false,
icon: 'ep:close', icon: 'ep:close',
@ -187,10 +187,24 @@ export function formCloseBtn(option:any) {
}) })
} }
// form表单-关闭按钮
export function formStagingBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`btn.暂存`).replace('btn.', ''),
name: 'staging',
hide: false,
color: '',
float:'right',
hasPermi: ''
})
}
// drawer抽屉头部-编辑按钮 // drawer抽屉头部-编辑按钮
export function drawerEditBtn(option:any) { export function drawerEditBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.编辑`).replace('btn.', ''), label: t(`ts.编辑`).replace('ts.', ''),
name: 'edit', name: 'edit',
hide: false, hide: false,
type: 'warning', type: 'warning',
@ -203,7 +217,7 @@ export function drawerEditBtn(option:any) {
// drawer抽屉头部-删除按钮 // drawer抽屉头部-删除按钮
export function drawerDeleteBtn(option:any) { export function drawerDeleteBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.删除`).replace('btn.', ''), label: t(`ts.删除`).replace('ts.', ''),
name: 'delete', name: 'delete',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -229,7 +243,7 @@ export function drawerDeleteBtn(option:any) {
// 主列表-编辑按钮 // 主列表-编辑按钮
export function mainListEditBtn(option:any) { export function mainListEditBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.编辑`).replace('btn.', ''), label: t(`ts.编辑`).replace('ts.', ''),
name: 'edit', name: 'edit',
hide: false, hide: false,
type: 'warning', type: 'warning',
@ -242,7 +256,7 @@ export function mainListEditBtn(option:any) {
// 主列表-删除按钮 // 主列表-删除按钮
export function mainListDeleteBtn(option:any) { export function mainListDeleteBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.删除`).replace('btn.', ''), label: t(`ts.删除`).replace('ts.', ''),
name: 'delete', name: 'delete',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -253,7 +267,7 @@ export function mainListDeleteBtn(option:any) {
} }
export function mainListEnableBtn(option:any) { export function mainListEnableBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.启用`).replace('btn.', ''), label: t(`ts.启用`).replace('ts.', ''),
name: 'enable', name: 'enable',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -264,7 +278,7 @@ export function mainListEnableBtn(option:any) {
} }
export function mainListDisableBtn(option:any) { export function mainListDisableBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.禁用`).replace('btn.', ''), label: t(`ts.禁用`).replace('ts.', ''),
name: 'disable', name: 'disable',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -276,7 +290,7 @@ export function mainListDisableBtn(option:any) {
// 主列表-中止按钮1 // 主列表-中止按钮1
export function mainListSuspend1Btn(option:any) { export function mainListSuspend1Btn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.中止`), label: t(`ts.中止`),
name: 'suspend', name: 'suspend',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -289,7 +303,7 @@ export function mainListSuspend1Btn(option:any) {
// 主列表-中止按钮2 // 主列表-中止按钮2
export function mainListSuspend2Btn(option:any) { export function mainListSuspend2Btn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.中止`).replace('btn.', ''), label: t(`ts.中止`).replace('ts.', ''),
name: 'suspend', name: 'suspend',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -302,7 +316,7 @@ export function mainListSuspend2Btn(option:any) {
// 主列表-领取按钮 // 主列表-领取按钮
export function mainListReceiveBtn(option:any) { export function mainListReceiveBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.领取`).replace('btn.', ''), label: t(`ts.领取`).replace('ts.', ''),
name: 'receive', name: 'receive',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -315,7 +329,7 @@ export function mainListReceiveBtn(option:any) {
// 主列表-完成按钮 // 主列表-完成按钮
export function mainListFinishBtn(option:any) { export function mainListFinishBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.完成`).replace('btn.', ''), label: t(`ts.完成`).replace('ts.', ''),
name: 'finish', name: 'finish',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -328,7 +342,7 @@ export function mainListFinishBtn(option:any) {
// 主列表-绑定 // 主列表-绑定
export function mainListBindBtn(option:any) { export function mainListBindBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.绑定`).replace('btn.', ''), label: t(`ts.绑定`).replace('ts.', ''),
name: 'bind', name: 'bind',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -340,7 +354,7 @@ export function mainListBindBtn(option:any) {
// 主列表-申请流程-关闭按钮 // 主列表-申请流程-关闭按钮
export function mainListCloseBtn(option:any) { export function mainListCloseBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.关闭`).replace('btn.', ''), label: t(`ts.关闭`).replace('ts.', ''),
name: 'mainClose', name: 'mainClose',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -353,7 +367,7 @@ export function mainListCloseBtn(option:any) {
// 主列表-申请流程-重新添加按钮 // 主列表-申请流程-重新添加按钮
export function mainListReAddBtn(option:any) { export function mainListReAddBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.重新添加`).replace('btn.', ''), label: t(`ts.重新添加`).replace('ts.', ''),
name: 'mainReAdd', name: 'mainReAdd',
hide: false, hide: false,
type: 'warning', type: 'warning',
@ -366,7 +380,7 @@ export function mainListReAddBtn(option:any) {
// 主列表-申请流程-提交审批按钮 // 主列表-申请流程-提交审批按钮
export function mainListSubmitBtn(option:any) { export function mainListSubmitBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.提交审批`).replace('btn.', ''), label: t(`ts.提交审批`).replace('ts.', ''),
name: 'mainSubmit', name: 'mainSubmit',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -379,7 +393,7 @@ export function mainListSubmitBtn(option:any) {
// 主列表-申请流程-驳回按钮 // 主列表-申请流程-驳回按钮
export function mainListTurnDownBtn(option:any) { export function mainListTurnDownBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.驳回`).replace('btn.', ''), label: t(`ts.驳回`).replace('ts.', ''),
name: 'mainTurnDown', name: 'mainTurnDown',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -392,7 +406,7 @@ export function mainListTurnDownBtn(option:any) {
// 主列表-申请流程-审批通过按钮 // 主列表-申请流程-审批通过按钮
export function mainListApproveBtn(option:any) { export function mainListApproveBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.审批通过`).replace('btn.', ''), label: t(`ts.审批通过`).replace('ts.', ''),
name: 'mainApprove', name: 'mainApprove',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -405,7 +419,7 @@ export function mainListApproveBtn(option:any) {
// 主列表-申请流程-处理按钮 // 主列表-申请流程-处理按钮
export function mainListHandleBtn(option:any) { export function mainListHandleBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.处理`).replace('btn.', ''), label: t(`ts.处理`).replace('ts.', ''),
name: 'mainHandle', name: 'mainHandle',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -418,7 +432,7 @@ export function mainListHandleBtn(option:any) {
// 主列表-订单流程-发布按钮 // 主列表-订单流程-发布按钮
export function mainListOrderPubBtn(option:any) { export function mainListOrderPubBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.发布`).replace('btn.', ''), label: t(`ts.发布`).replace('ts.', ''),
name: 'mainOrderPub', name: 'mainOrderPub',
hide: false, hide: false,
type: 'success', type: 'success',
@ -431,7 +445,7 @@ export function mainListOrderPubBtn(option:any) {
// 主列表-订单流程-关闭按钮 // 主列表-订单流程-关闭按钮
export function mainListOrderCloBtn(option:any) { export function mainListOrderCloBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.关闭`).replace('btn.', ''), label: t(`ts.关闭`).replace('ts.', ''),
name: 'mainOrderClo', name: 'mainOrderClo',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -444,7 +458,7 @@ export function mainListOrderCloBtn(option:any) {
// 主列表-订单流程-打开按钮 // 主列表-订单流程-打开按钮
export function mainListOrderOpeBtn(option:any) { export function mainListOrderOpeBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.打开`).replace('btn.', ''), label: t(`ts.打开`).replace('ts.', ''),
name: 'mainOrderOpe', name: 'mainOrderOpe',
hide: false, hide: false,
type: 'warning', type: 'warning',
@ -457,7 +471,7 @@ export function mainListOrderOpeBtn(option:any) {
// 主列表-订单流程-下架按钮 // 主列表-订单流程-下架按钮
export function mainListOrderWitBtn(option:any) { export function mainListOrderWitBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.下架`).replace('btn.', ''), label: t(`ts.下架`).replace('ts.', ''),
name: 'mainOrderWit', name: 'mainOrderWit',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -470,7 +484,7 @@ export function mainListOrderWitBtn(option:any) {
// 主列表-计划流程-打开按钮 // 主列表-计划流程-打开按钮
export function mainListPlanOpeBtn(option:any) { export function mainListPlanOpeBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.打开`).replace('btn.', ''), label: t(`ts.打开`).replace('ts.', ''),
name: 'mainPlanOpe', name: 'mainPlanOpe',
hide: false, hide: false,
type: 'warning', type: 'warning',
@ -483,7 +497,7 @@ export function mainListPlanOpeBtn(option:any) {
// 主列表-计划流程-关闭按钮 // 主列表-计划流程-关闭按钮
export function mainListPlanCloBtn(option:any) { export function mainListPlanCloBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.关闭`).replace('btn.', ''), label: t(`ts.关闭`).replace('ts.', ''),
name: 'mainPlanClo', name: 'mainPlanClo',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -496,7 +510,7 @@ export function mainListPlanCloBtn(option:any) {
// 主列表-上传质量报告 // 主列表-上传质量报告
export function mainListPlanUploadQualityReportBtn(option:any) { export function mainListPlanUploadQualityReportBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.上传质量报告`).replace('btn.', ''), label: t(`ts.上传质量报告`).replace('ts.', ''),
name: 'mainPlanUploadQualityReport', name: 'mainPlanUploadQualityReport',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -509,7 +523,7 @@ export function mainListPlanUploadQualityReportBtn(option:any) {
// 主列表-计划流程-提交审批按钮 // 主列表-计划流程-提交审批按钮
export function mainListPlanSubBtn(option:any) { export function mainListPlanSubBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.提交审批`).replace('btn.', ''), label: t(`ts.提交审批`).replace('ts.', ''),
name: 'mainPlanSub', name: 'mainPlanSub',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -522,7 +536,7 @@ export function mainListPlanSubBtn(option:any) {
// 主列表-计划流程-驳回按钮 // 主列表-计划流程-驳回按钮
export function mainListPlanTurBtn(option:any) { export function mainListPlanTurBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.驳回`).replace('btn.', ''), label: t(`ts.驳回`).replace('ts.', ''),
name: 'mainPlanTur', name: 'mainPlanTur',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -535,7 +549,7 @@ export function mainListPlanTurBtn(option:any) {
// 主列表-计划流程-重置按钮 // 主列表-计划流程-重置按钮
export function mainListPlanResBtn(option:any) { export function mainListPlanResBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.重置`).replace('btn.', ''), label: t(`ts.重置`).replace('ts.', ''),
name: 'mainPlanRes', name: 'mainPlanRes',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -548,7 +562,7 @@ export function mainListPlanResBtn(option:any) {
// 主列表-计划流程-审批通过按钮 // 主列表-计划流程-审批通过按钮
export function mainListPlanAppBtn(option:any) { export function mainListPlanAppBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.审批通过`).replace('btn.', ''), label: t(`ts.审批通过`).replace('ts.', ''),
name: 'mainPlanApp', name: 'mainPlanApp',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -561,7 +575,7 @@ export function mainListPlanAppBtn(option:any) {
// 主列表-计划流程-发布按钮 // 主列表-计划流程-发布按钮
export function mainListPlanPubBtn(option:any) { export function mainListPlanPubBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.发布`).replace('btn.', ''), label: t(`ts.发布`).replace('ts.', ''),
name: 'mainPlanPub', name: 'mainPlanPub',
hide: false, hide: false,
type: 'success', type: 'success',
@ -574,7 +588,7 @@ export function mainListPlanPubBtn(option:any) {
// 主列表-计划流程-执行按钮 // 主列表-计划流程-执行按钮
export function mainListPlanComBtn(option:any) { export function mainListPlanComBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.执行`).replace('btn.', ''), label: t(`ts.执行`).replace('ts.', ''),
name: 'mainPlanCom', name: 'mainPlanCom',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -587,7 +601,7 @@ export function mainListPlanComBtn(option:any) {
// 主列表-要货计划流程-修改按钮 // 主列表-要货计划流程-修改按钮
export function mainListPurchasePlanModBtn(option:any) { export function mainListPurchasePlanModBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.修改`).replace('btn.', ''), label: t(`ts.修改`).replace('ts.', ''),
name: 'mainPurPlanMod', name: 'mainPurPlanMod',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -600,7 +614,7 @@ export function mainListPurchasePlanModBtn(option:any) {
// 主列表-要货计划流程-下架按钮 // 主列表-要货计划流程-下架按钮
export function mainListPurchasePlanWitBtn(option:any) { export function mainListPurchasePlanWitBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.下架`), label: t(`ts.下架`),
name: 'mainPurPlanWit', name: 'mainPurPlanWit',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -613,7 +627,7 @@ export function mainListPurchasePlanWitBtn(option:any) {
// 主列表-要货计划流程-不接受按钮 // 主列表-要货计划流程-不接受按钮
export function mainListPurchasePlanRejBtn(option:any) { export function mainListPurchasePlanRejBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.不接受`).replace('btn.', ''), label: t(`ts.不接受`).replace('ts.', ''),
name: 'mainPurPlanRej', name: 'mainPurPlanRej',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -626,7 +640,7 @@ export function mainListPurchasePlanRejBtn(option:any) {
// 主列表-要货计划流程-接受按钮 // 主列表-要货计划流程-接受按钮
export function mainListPurchasePlanAccBtn(option:any) { export function mainListPurchasePlanAccBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.接受`).replace('btn.', ''), label: t(`ts.接受`).replace('ts.', ''),
name: 'mainPurPlanAcc', name: 'mainPurPlanAcc',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -639,7 +653,7 @@ export function mainListPurchasePlanAccBtn(option:any) {
// 主列表-要货计划流程-发布按钮 // 主列表-要货计划流程-发布按钮
export function mainListPurchasePlanPubBtn(option:any) { export function mainListPurchasePlanPubBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.发布`).replace('btn.', ''), label: t(`ts.发布`).replace('ts.', ''),
name: 'mainPurPlanPub', name: 'mainPurPlanPub',
hide: false, hide: false,
type: 'success', type: 'success',
@ -652,7 +666,7 @@ export function mainListPurchasePlanPubBtn(option:any) {
// 主列表-要货计划流程-关闭按钮 // 主列表-要货计划流程-关闭按钮
export function mainListPurchasePlanCloBtn(option:any) { export function mainListPurchasePlanCloBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.关闭`).replace('btn.', ''), label: t(`ts.关闭`).replace('ts.', ''),
name: 'mainPurPlanClo', name: 'mainPurPlanClo',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -665,7 +679,7 @@ export function mainListPurchasePlanCloBtn(option:any) {
// 主列表-要货计划流程-打开按钮 // 主列表-要货计划流程-打开按钮
export function mainListPurchasePlanOpeBtn(option:any) { export function mainListPurchasePlanOpeBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.打开`).replace('btn.', ''), label: t(`ts.打开`).replace('ts.', ''),
name: 'mainPurPlanOpe', name: 'mainPurPlanOpe',
hide: false, hide: false,
type: 'warning', type: 'warning',
@ -678,7 +692,7 @@ export function mainListPurchasePlanOpeBtn(option:any) {
// 主列表-任务流程-承接按钮 // 主列表-任务流程-承接按钮
export function mainListJobAccBtn(option:any) { export function mainListJobAccBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.承接`).replace('btn.', ''), label: t(`ts.承接`).replace('ts.', ''),
name: 'mainJobAcc', name: 'mainJobAcc',
hide: false, hide: false,
type: 'success', type: 'success',
@ -691,7 +705,7 @@ export function mainListJobAccBtn(option:any) {
// 主列表-任务流程-关闭按钮 // 主列表-任务流程-关闭按钮
export function mainListJobCloBtn(option:any) { export function mainListJobCloBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.关闭`).replace('btn.', ''), label: t(`ts.关闭`).replace('ts.', ''),
name: 'mainJobClo', name: 'mainJobClo',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -704,7 +718,7 @@ export function mainListJobCloBtn(option:any) {
// 主列表-任务流程-放弃按钮 // 主列表-任务流程-放弃按钮
export function mainListJobAbaBtn(option:any) { export function mainListJobAbaBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.放弃`).replace('btn.', ''), label: t(`ts.放弃`).replace('ts.', ''),
name: 'mainJobAba', name: 'mainJobAba',
hide: false, hide: false,
type: 'danger', type: 'danger',
@ -717,7 +731,7 @@ export function mainListJobAbaBtn(option:any) {
// 主列表-任务流程-执行按钮 // 主列表-任务流程-执行按钮
export function mainListJobExeBtn(option:any) { export function mainListJobExeBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.执行`).replace('btn.', ''), label: t(`ts.执行`).replace('ts.', ''),
name: 'mainJobExe', name: 'mainJobExe',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -730,7 +744,7 @@ export function mainListJobExeBtn(option:any) {
// 主列表-任务流程-执行按钮(与执行按钮一致 只是名改叫'收货'而已) // 主列表-任务流程-执行按钮(与执行按钮一致 只是名改叫'收货'而已)
export function mainListJobRecBtn(option:any) { export function mainListJobRecBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.收货`).replace('btn.', ''), label: t(`ts.收货`).replace('ts.', ''),
name: 'mainJobExe', name: 'mainJobExe',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -742,7 +756,7 @@ export function mainListJobRecBtn(option:any) {
// 主列表-包装按钮 // 主列表-包装按钮
export function mainListPackageBtn(option:any) { export function mainListPackageBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.包装`).replace('btn.', ''), label: t(`ts.包装`).replace('ts.', ''),
name: 'mainPackage', name: 'mainPackage',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -754,7 +768,7 @@ export function mainListPackageBtn(option:any) {
// 主列表-打印 // 主列表-打印
export function mainListPointBtn(option:any) { export function mainListPointBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.打印标签`).replace('btn.', ''), label: t(`ts.打印标签`).replace('ts.', ''),
name: 'point', name: 'point',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -766,7 +780,7 @@ export function mainListPointBtn(option:any) {
// 主列表-批量打印 // 主列表-批量打印
export function mainLisSelectiontPointBtn(option:any) { export function mainLisSelectiontPointBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.批量打印`).replace('btn.', ''), label: t(`ts.批量打印`).replace('ts.', ''),
name: 'selection_point', name: 'selection_point',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -779,7 +793,7 @@ export function mainLisSelectiontPointBtn(option:any) {
// 主列表-生成采购收货申请 // 主列表-生成采购收货申请
export function mainListGenerateApplicationBtn(option:any) { export function mainListGenerateApplicationBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.生成采购收货申请`).replace('btn.', ''), label: t(`ts.生成采购收货申请`).replace('ts.', ''),
name: 'generateApplication', name: 'generateApplication',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -791,7 +805,7 @@ export function mainListGenerateApplicationBtn(option:any) {
// 主列表-打印 // 主列表-打印
export function mainListDocumentPrintBtn(option:any) { export function mainListDocumentPrintBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.单据打印`).replace('btn.', ''), label: t(`ts.单据打印`).replace('ts.', ''),
name: 'documentPrint', name: 'documentPrint',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -803,7 +817,7 @@ export function mainListDocumentPrintBtn(option:any) {
// 主列表-生成到货检验申请 // 主列表-生成到货检验申请
export function mainInspectRequestBtn(option:any) { export function mainInspectRequestBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.发送到货检验申请`).replace('btn.', ''), label: t(`ts.发送到货检验申请`).replace('ts.', ''),
name: 'inspectRequest', name: 'inspectRequest',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -815,7 +829,7 @@ export function mainInspectRequestBtn(option:any) {
// 主列表-生成采购上架申请 // 主列表-生成采购上架申请
export function mainPutawayRequestBtn(option:any) { export function mainPutawayRequestBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.生成采购上架申请`).replace('btn.', ''), label: t(`ts.生成采购上架申请`).replace('ts.', ''),
name: 'putawayRequest', name: 'putawayRequest',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -827,7 +841,7 @@ export function mainPutawayRequestBtn(option:any) {
// 主列表-生成盘点调整申请 // 主列表-生成盘点调整申请
export function mainCountAdjustRequesttBtn(option:any) { export function mainCountAdjustRequesttBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.生成盘点调整申请`).replace('btn.', ''), label: t(`ts.生成盘点调整申请`).replace('ts.', ''),
name: 'countAdjustRequest', name: 'countAdjustRequest',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -839,7 +853,7 @@ export function mainCountAdjustRequesttBtn(option:any) {
// 主列表-重盘 // 主列表-重盘
export function mainReCountBtn(option:any) { export function mainReCountBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.重盘`).replace('btn.', ''), label: t(`ts.重盘`).replace('ts.', ''),
name: 'mainReCount', name: 'mainReCount',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -851,7 +865,7 @@ export function mainReCountBtn(option:any) {
// 主列表-监盘 // 主列表-监盘
export function mainSuperviseCountBtn(option:any) { export function mainSuperviseCountBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.监盘`).replace('btn.', ''), label: t(`ts.监盘`).replace('ts.', ''),
name: 'mainSuperviseCount', name: 'mainSuperviseCount',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -863,7 +877,7 @@ export function mainSuperviseCountBtn(option:any) {
// 主列表-解冻 // 主列表-解冻
export function mainThawRequesttBtn(option:any) { export function mainThawRequesttBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.解冻`).replace('btn.', ''), label: t(`ts.解冻`).replace('ts.', ''),
name: 'mainThaw', name: 'mainThaw',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -875,7 +889,7 @@ export function mainThawRequesttBtn(option:any) {
// 主列表-更新检验记录 // 主列表-更新检验记录
export function mainUpdataRecodeBtn(option:any) { export function mainUpdataRecodeBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.更新检验记录`).replace('btn.', ''), label: t(`ts.更新检验记录`).replace('ts.', ''),
name: 'updataRecode', name: 'updataRecode',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -887,7 +901,7 @@ export function mainUpdataRecodeBtn(option:any) {
// 主列表-使用决策 // 主列表-使用决策
export function mainApplyDecisionBtn(option:any) { export function mainApplyDecisionBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: t(`btn.使用决策`).replace('btn.', ''), label: t(`ts.使用决策`).replace('ts.', ''),
name: 'applyDecision', name: 'applyDecision',
hide: false, hide: false,
type: 'primary', type: 'primary',

11
src/utils/formatter.ts

@ -10,3 +10,14 @@ export const fenToYuanFormat = (
) => { ) => {
return `${fenToYuan(cellValue)}` return `${fenToYuan(cellValue)}`
} }
export const accountantFormart = (row, column, cellValue) => {
cellValue = cellValue + '' || ''
let x = cellValue.split('.')
let x1 = x[0]
let x2 = x.length > 1 ? '.' + x[1] : ''
const reg = /(\d+)(\d{3})/
while(reg.test(x1)){
x1 = x1.replace(reg, '$1,$2')
}
return x1+x2
}

133
src/views/qms/basicDataManage/selectedProject/selectedProject.data.ts

@ -1,133 +0,0 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as DictTypeApi from '@/api/system/dict/dict.type'
const optionsList = await DictTypeApi.getDictTypeAndData('inspection')
optionsList.forEach(element => {
element.options = element.dictDataRespVOList.map(item => {
return {
value: element.type + "-%%%-" + item.value,
label: element.name + "-" + item.label
}
})
})
// 表单校验
export const SelectedProjectRules = reactive({
code: [required],
dictionaryTypeAndCode: [required],
estimateCode: [required],
defectLevel: [required],
})
export const SelectedProject = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isTableForm: false,
isSearch: true,
fixed: 'left',
form: {
componentProps:{
disabled:true
}
}
},
{
label: '字典及字典项',
field: 'dictionaryTypeAndCode',
sort: 'custom',
formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => {
return optionsList.find(item => item.options.some(option => option.value === cellValue))?.options.find(option => option.value === cellValue)?.label
},
isSearch: false,
isDetail: false,
isTable: true,
isForm: true,
tableForm: {
type: 'SelectGroup',
initOptions: optionsList,
filterable: true,
},
form: {
component: 'Select',
componentProps: {
options: optionsList,
filterable: true,
}
},
},
{
label: '字典',
field: 'dictionaryCode',
sort: 'custom',
isSearch: false,
isTableForm: false,
isDetail: false,
isTable: false,
isForm: false,
},
{
label: '字典项',
field: 'dictionaryValue',
sort: 'custom',
isSearch: false,
isTableForm: false,
isDetail: false,
isTable: false,
isForm: false,
},
{
label: '字典名称',
field: 'dictionaryLabel',
sort: 'custom',
isSearch: false,
isTableForm: false,
isDetail: false,
isTable: false,
isForm: false,
},
{
label: '评估代码',
field: 'estimateCode',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.EVALUATION_CODE,
dictClass: 'string',
tableForm: {
type: 'Select',
},
form: {
component: 'Select',
}
},
{
label: '缺陷级别',
field: 'defectLevel',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.DEFECT_LEVEL,
dictClass: 'string',
tableForm: {
type: 'Select',
},
form: {
component: 'Select',
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm: false,
}
]))

0
src/views/qms/basicDataManage/counter/counter.data.ts → src/views/qms/counter/counter.data.ts

0
src/views/qms/basicDataManage/counter/index.vue → src/views/qms/counter/index.vue

0
src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts → src/views/qms/dynamicRule/dynamicRule.data.ts

0
src/views/qms/basicDataManage/dynamicRule/index.vue → src/views/qms/dynamicRule/index.vue

0
src/views/qms/inspection/inspectionJob/addForm.vue → src/views/qms/inspectionJob/addForm.vue

0
src/views/qms/inspection/inspectionJob/detail.vue → src/views/qms/inspectionJob/detail.vue

2
src/views/qms/inspection/inspectionJob/index.vue → src/views/qms/inspectionJob/index.vue

@ -59,7 +59,7 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage,InspectionJobPackageRules} from './inspectionJobMain.data' import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage,InspectionJobPackageRules} from './inspectionJobMain.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../../basicDataManage/inspectionTemplate/inspectionTemplate.data' import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage' import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'

0
src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts → src/views/qms/inspectionJob/inspectionJobMain.data.ts

0
src/views/qms/inspection/inspectionRecord/addForm.vue → src/views/qms/inspectionRecord/addForm.vue

0
src/views/qms/inspection/inspectionRecord/detail.vue → src/views/qms/inspectionRecord/detail.vue

0
src/views/qms/inspection/inspectionRecord/index.vue → src/views/qms/inspectionRecord/index.vue

0
src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts → src/views/qms/inspectionRecord/inspectionRecordMain.data.ts

0
src/views/qms/inspection/inspectionRequest/index.vue → src/views/qms/inspectionRequest/index.vue

16
src/views/qms/inspection/inspectionRequest/inspectionRequestMain.data.ts → src/views/qms/inspectionRequest/inspectionRequestMain.data.ts

@ -370,8 +370,8 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
// 表单校验 // 表单校验
export const InspectionRequestPackageRules = reactive({ export const InspectionRequestPackageRules = reactive({
packageCode: [required], // packageCode: [required],
packageSpecificationCode: [required], // packageSpecificationCode: [required],
amount: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}], amount: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}],
measuringUnit: [required], measuringUnit: [required],
}) })
@ -388,9 +388,6 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{ tableForm:{
disabled:true disabled:true
}, },
table:{
width:200
},
isTableForm:false, isTableForm:false,
form:{ form:{
componentProps:{ componentProps:{
@ -406,9 +403,6 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{ tableForm:{
disabled:false disabled:false
}, },
table:{
width:200
}
}, },
{ {
label: '包装规格', label: '包装规格',
@ -418,9 +412,6 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{ tableForm:{
disabled:false disabled:false
}, },
table:{
width:180
}
}, },
{ {
label: '数量', label: '数量',
@ -434,9 +425,6 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{ tableForm:{
disabled:false disabled:false
}, },
table:{
width:150
}
}, },
{ {
label: '计量单位', label: '计量单位',

14
src/views/qms/basicDataManage/inspectionScheme/addForm.vue → src/views/qms/inspectionScheme/addForm.vue

@ -104,7 +104,13 @@
'检验模板', '检验模板',
InspectionTemplateMain.allSchemas, InspectionTemplateMain.allSchemas,
InspectionTemplateApi.inspectionTemplatePage, InspectionTemplateApi.inspectionTemplatePage,
null, [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false, false,
'main', 'main',
null null
@ -631,7 +637,7 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate' import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate'
import { SearchTable } from '@/components/SearchTable' import { SearchTable } from '@/components/SearchTable'
import { SamplingProcess } from '@/views/qms/samplingProcess/samplingProcess.data' import { SamplingProcess } from '@/views/qms/samplingProcess/samplingProcess.data'
import { InspectionTemplateMain } from '@/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data' import { InspectionTemplateMain } from '@/views/qms/inspectionTemplate/inspectionTemplate.data'
import * as InspectionTemplateApi from '@/api/qms/inspectionTemplate' import * as InspectionTemplateApi from '@/api/qms/inspectionTemplate'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as ItemBasicApi from '@/api/wms/itembasic' import * as ItemBasicApi from '@/api/wms/itembasic'
@ -639,9 +645,9 @@ import * as SamplingProcessApi from '@/api/qms/samplingProcess' //采样过程
import * as InspectionMethodApi from '@/api/qms/inspectionMethod' // import * as InspectionMethodApi from '@/api/qms/inspectionMethod' //
import { InspectionMethod } from '@/views/qms/inspectionMethod/inspectionMethod.data' // import { InspectionMethod } from '@/views/qms/inspectionMethod/inspectionMethod.data' //
import * as DynamicRuleApi from '@/api/qms/dynamicRule' // import * as DynamicRuleApi from '@/api/qms/dynamicRule' //
import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule.data' // import { DynamicRule } from '@/views/qms/dynamicRule/dynamicRule.data' //
import * as SelectedSetApi from '@/api/qms/selectedSet' // import * as SelectedSetApi from '@/api/qms/selectedSet' //
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' // import { SelectedSet } from '@/views/qms/selectedSet/selectedSet.data' //
import {validateTwoNum} from '@/utils/validator' import {validateTwoNum} from '@/utils/validator'
const message = useMessage() // const message = useMessage() //

0
src/views/qms/basicDataManage/inspectionScheme/index.vue → src/views/qms/inspectionScheme/index.vue

0
src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts → src/views/qms/inspectionScheme/inspectionScheme.data.ts

0
src/views/qms/basicDataManage/inspectionStage/index.vue → src/views/qms/inspectionStage/index.vue

0
src/views/qms/basicDataManage/inspectionStage/inspectionStage.data.ts → src/views/qms/inspectionStage/inspectionStage.data.ts

4
src/views/qms/basicDataManage/inspectionTemplate/addForm.vue → src/views/qms/inspectionTemplate/addForm.vue

@ -431,9 +431,9 @@ import * as SamplingProcessApi from '@/api/qms/samplingProcess' //采样过程
import * as InspectionMethodApi from '@/api/qms/inspectionMethod' // import * as InspectionMethodApi from '@/api/qms/inspectionMethod' //
import { InspectionMethod } from '@/views/qms/inspectionMethod/inspectionMethod.data' // import { InspectionMethod } from '@/views/qms/inspectionMethod/inspectionMethod.data' //
import * as DynamicRuleApi from '@/api/qms/dynamicRule' // import * as DynamicRuleApi from '@/api/qms/dynamicRule' //
import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule.data' // import { DynamicRule } from '@/views/qms/dynamicRule/dynamicRule.data' //
import * as SelectedSetApi from '@/api/qms/selectedSet' // import * as SelectedSetApi from '@/api/qms/selectedSet' //
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' // import { SelectedSet } from '@/views/qms/selectedSet/selectedSet.data' //
import { validateInteger,validateTwoNum,validateMaxNumber5,validateNumSix } from '@/utils/validator' import { validateInteger,validateTwoNum,validateMaxNumber5,validateNumSix } from '@/utils/validator'
const message = useMessage() // const message = useMessage() //

0
src/views/qms/basicDataManage/inspectionTemplate/index.vue → src/views/qms/inspectionTemplate/index.vue

0
src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts → src/views/qms/inspectionTemplate/inspectionTemplate.data.ts

10
src/views/qms/basicDataManage/selectedProject/index.vue → src/views/qms/selectedProject/index.vue

@ -99,9 +99,9 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:selectedProject:create'}), // defaultButtons.defaultAddBtn({hasPermi:'qms:selectedProject:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:selectedProject:import'}), // defaultButtons.defaultImportBtn({hasPermi:'qms:selectedProject:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:selectedProject:export'}), // defaultButtons.defaultExportBtn({hasPermi:'qms:selectedProject:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:selectedProject:update'}), // defaultButtons.mainListEditBtn({hasPermi:'qms:selectedProject:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:selectedProject:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi:'qms:selectedProject:delete'}), //
] ]
// - // -

81
src/views/qms/selectedProject/selectedProject.data.ts

@ -0,0 +1,81 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as DictTypeApi from '@/api/system/dict/dict.type'
// 表单校验
export const SelectedProjectRules = reactive({
code: [required],
// dictionaryTypeAndCode: [required],
estimateCode: [required],
defectLevel: [required],
dictionaryValue: [required]
})
export const SelectedProject = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isTableForm: false,
isSearch: true,
fixed: 'left',
form: {
componentProps:{
disabled:true
}
}
},
{
label: '字典项',
field: 'dictionaryValue',
sort: 'custom',
isSearch: true,
isTableForm: true,
isDetail: true,
isTable: true,
isForm: true,
},
{
label: '评估代码',
field: 'estimateCode',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.EVALUATION_CODE,
dictClass: 'string',
tableForm: {
type: 'Select',
},
form: {
component: 'Select',
}
},
// {
// label: '缺陷级别',
// field: 'defectLevel',
// sort: 'custom',
// isSearch: true,
// dictType: DICT_TYPE.DEFECT_LEVEL,
// dictClass: 'string',
// tableForm: {
// type: 'Select',
// },
// form: {
// component: 'Select',
// }
// },
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm: false,
}
]))

102
src/views/qms/basicDataManage/selectedSet/index.vue → src/views/qms/selectedSet/index.vue

@ -108,6 +108,7 @@ const tableData = ref([])
const routeName = ref() const routeName = ref()
const selectDictType = ref() const selectDictType = ref()
const optionsList = ref() const optionsList = ref()
const existValue = ref([])
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(SelectedSet.allSchemas.tableColumns) const tableColumns = ref(SelectedSet.allSchemas.tableColumns)
@ -338,19 +339,6 @@ const submitForm = async (formType, data) => {
return return
} }
data.selectedProjectDOList = tableData.value// data.selectedProjectDOList = tableData.value//
data.selectedProjectDOList = data.selectedProjectDOList.map(item => {
// '-%%%-'' dictionaryCode
const [dictionaryCode, dictionaryValue] = item.dictionaryTypeAndCode.split('-%%%-');
const dictionary = optionsList.value.find(temp => temp.options.some(option => option.value === item.dictionaryTypeAndCode))
const dictionaryLabel = dictionary?.options.find(option => option.value === item.dictionaryTypeAndCode)?.label
// dictionaryCode dictionaryValue
return {
...item,
dictionaryCode,
dictionaryValue,
dictionaryLabel
};
});
try { try {
if (formType === 'create') { if (formType === 'create') {
await SelectedSetApi.createSelectedSet(data) await SelectedSetApi.createSelectedSet(data)
@ -373,43 +361,10 @@ const validateDetailEmpty = (data) => {
} }
return true; return true;
} }
const updateSelections = async (masterId,row) => {
let param = { masterId: masterId };
SelectedProjectApi.getSelectedProjectNoPage(param).then(res => {
DictTypeApi.getDictTypeAndData('inspection').then(originalResponse => {
// element
const response = originalResponse.map(element => {
const options = element.dictDataRespVOList.map(item => {
return {
value: element.type + "-%%%-" + item.value,
label: element.name + "-" + item.label
};
}).filter(option => {
// resdictionaryTypeAndCodeoption
return !res.some(resItem => {
if(row != null){
return option.value === resItem.dictionaryTypeAndCode && option.value != row.dictionaryTypeAndCode
}else{
return option.value === resItem.dictionaryTypeAndCode
}
});
});
return { ...element, options }; // elementoptions
}).filter(element => element.options.length > 0); // optionselement
// options
const formSchemaItem = SelectedProject.allSchemas.formSchema.find(item => item.field === 'dictionaryTypeAndCode');
if (formSchemaItem) {
formSchemaItem.componentProps.options = response;
}
});
});
};
const validateNotRepetition = (data) => { const validateNotRepetition = (data) => {
// dictionaryTypeAndCode // dictionaryTypeAndCode
const codes = data.map(item => item.dictionaryTypeAndCode); const codes = data.map(item => item.dictionaryValue);
// Set dictionaryTypeAndCode // Set dictionaryTypeAndCode
const uniqueCodes = new Set(codes); const uniqueCodes = new Set(codes);
@ -423,59 +378,52 @@ const validateNotRepetition = (data) => {
}; };
const detailValidate = (data) => { const detailValidate = (formType,data) => {
let tag = true; let tag = true;
existValue.value.forEach(item=>{
if(data.dictionaryValue == item.dictionaryValue){
message.warning("选定集字典项不能重复!")
tag = false;
}
})
return tag return tag
} }
const detailOpenForm = (type, row, masterParmas) => { const detailOpenForm = (type, row, masterParmas) => {
let param = {
masterId : masterParmas.masterId
}
if(type == 'create'){ if(type == 'create'){
updateSelections(masterParmas.masterId,row) SelectedProjectApi.getSelectedProjectNoPage(param).then(res => {
if(res.length > 0){
existValue.value = res
}
})
}else if('update'){ }else if('update'){
updateSelections(masterParmas.masterId,row) SelectedProjectApi.getSelectedProjectNoPage(param).then(res => {
if(res.length > 0){
existValue.value = res.filter(item=>{
return item?.id != row.id
})
} }
})
} }
}
const detailBasiFormOnChange = (field,val,detailFormRef) => { const detailBasiFormOnChange = (field,val,detailFormRef) => {
if(field == 'dictionaryTypeAndCode'){
// '-%%%-'' dictionaryCode
const [dictionaryCode, dictionaryValue] = val.split('-%%%-');
const dictionary = optionsList.value.find(temp => temp.options.some(option => option.value === val))
const dictionaryLabel = dictionary?.options.find(option => option.value === val)?.label
const setV = {}
setV['dictionaryLabel'] = dictionaryLabel
setV['dictionaryCode'] = dictionaryCode
setV['dictionaryValue'] = dictionaryValue
nextTick(() => {
detailFormRef.setValues(setV)
})
}
} }
const formSelectChange = (a,b,c,d) => { const formSelectChange = (a,b,c,d) => {
}
const getDicDetails = ()=>{
DictTypeApi.getDictTypeAndData('inspection').then(res=>{
res.forEach(element => {
element.options = element.dictDataRespVOList.map(item => {
return {
value: element.type + "-%%%-" + item.value,
label: element.name + "-" + item.label
}
})
})
optionsList.value = res
})
} }
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
getDicDetails()
importTemplateData.templateUrl = await SelectedSetApi.importTemplate() importTemplateData.templateUrl = await SelectedSetApi.importTemplate()
}) })

0
src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts → src/views/qms/selectedSet/selectedSet.data.ts

108
src/views/system/messageSet/index.vue

@ -67,6 +67,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as TableActionRelApi from '@/api/system/tableActionRel' import * as TableActionRelApi from '@/api/system/tableActionRel'
import { validateCode } from '@/utils/validator'
defineOptions({ name: 'MessageSet' }) defineOptions({ name: 'MessageSet' })
@ -121,6 +122,7 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
openForm('create') openForm('create')
resetTemplateSet(null)
} else if (val == 'import') { // } else if (val == 'import') { //
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') { //
@ -143,6 +145,7 @@ const butttondata = [
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
openForm('update', row) openForm('update', row)
resetTemplateSet(row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} }
@ -152,17 +155,15 @@ const alreadySelectedActionList = ref()
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
TableActionRelApi.getTableActionRelNoPage({}).then(res=>{
tableActionRef.value = res
});
MessageSetApi.getMessageSetNoPage({}).then(res=>{
alreadySelectedActionList.value = res
});
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType,data) => {
if(!validateMessageMethod(data)){
message.warning("至少选择一种发送模板!")
return;
}
var isHave =MessageSet.allSchemas.formSchema.some(function (item) { var isHave =MessageSet.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime'; return item.field === 'activeTime' || item.field === 'expireTime';
}); });
@ -245,7 +246,91 @@ const searchFormClick = (searchData) => {
} }
const onChange = (field, cur) => { const onChange = (field, cur) => {
const formSchema = MessageSet.allSchemas.formSchema
if (field == 'tableName') { if (field == 'tableName') {
dealSubSelection(cur,null)
let setV = {}
setV['act'] = null
basicFormRef.value.formRef.setValues(setV)
}
if(field == 'smsTemplateEnabled'){
if(cur){
formSchema.find(item=>item.field == 'smsTemplateId').componentProps.disabled = false
MessageSetRules.smsTemplateId = [{required:true,message:'请选择站内信模板'}]
}else{
formSchema.find(item=>item.field == 'smsTemplateId').componentProps.disabled = true
MessageSetRules.smsTemplateId = [{required:false,message:'请选择站内信模板'}]
const setV = {}
setV['smsTemplateId'] = ''
basicFormRef.value.formRef.setValues(setV)
}
}else if(field == 'emailTemplateEnabled'){
if(cur){
formSchema.find(item=>item.field == 'emailTemplateId').componentProps.disabled = false
MessageSetRules.emailTemplateId = [{required:true,message:'请选择站内信模板'}]
}else{
formSchema.find(item=>item.field == 'emailTemplateId').componentProps.disabled = true
MessageSetRules.emailTemplateId = [{required:false,message:'请选择站内信模板'}]
const setV = {}
setV['emailTemplateId'] = ''
basicFormRef.value.formRef.setValues(setV)
}
}else if(field == 'internalMessageTemplateEnabled'){
if(cur){
formSchema.find(item=>item.field == 'internalMessageTemplateId').componentProps.disabled = false
MessageSetRules.internalMessageTemplateId = [{required:true,message:'请选择站内信模板'}]
}else{
formSchema.find(item=>item.field == 'internalMessageTemplateId').componentProps.disabled = true
MessageSetRules.internalMessageTemplateId = [{required:false,message:'请选择站内信模板'}]
const setV = {}
setV['internalMessageTemplateId'] = ''
basicFormRef.value.formRef.setValues(setV)
}
}
};
const resetTemplateSet = (row) =>{
const formSchema = MessageSet.allSchemas.formSchema
formSchema.find(item=>item.field == 'smsTemplateId').componentProps.disabled = true
formSchema.find(item=>item.field == 'emailTemplateId').componentProps.disabled = true
formSchema.find(item=>item.field == 'internalMessageTemplateId').componentProps.disabled = true
formSchema.find(item=>item.field == 'act').componentProps.options = []
MessageSetRules.smsTemplateId = [{required:false,message:'请选择短信模板'}]
MessageSetRules.emailTemplateId = [{required:false,message:'请选择邮件模板'}]
MessageSetRules.internalMessageTemplateId = [{required:false,message:'请选择站内信模板'}]
if(row){
dealSubSelection(row.tableName,row)
if(row.smsTemplateEnabled){
formSchema.find(item=>item.field == 'smsTemplateId').componentProps.disabled = false
MessageSetRules.smsTemplateId = [{required:true,message:'请选择短信模板'}]
}
if(row.emailTemplateEnabled){
formSchema.find(item=>item.field == 'emailTemplateId').componentProps.disabled = false
MessageSetRules.emailTemplateId = [{required:true,message:'请选择邮件模板'}]
}
if(row.internalMessageTemplateEnabled){
formSchema.find(item=>item.field == 'internalMessageTemplateId').componentProps.disabled = false
MessageSetRules.internalMessageTemplateId = [{required:true,message:'请选择站内信模板'}]
}
}
}
const validateMessageMethod = (data) => {
if(data.smsTemplateId || data.emailTemplateId || data.internalMessageTemplateId) {
return true
}
return false
}
const dealSubSelection = (cur,row) =>{
basicFormRef.value.formLoading = true
TableActionRelApi.getTableActionRelNoPage({}).then(res=>{
tableActionRef.value = res
MessageSetApi.getMessageSetNoPage({}).then(res=>{
alreadySelectedActionList.value = res
const formSchema = MessageSet.allSchemas.formSchema
// curactionList // curactionList
let actionList = tableActionRef.value.filter(element => element.tableName === cur); let actionList = tableActionRef.value.filter(element => element.tableName === cur);
@ -253,19 +338,20 @@ const onChange = (field, cur) => {
actionList = actionList.filter(element => actionList = actionList.filter(element =>
!alreadySelectedActionList.value.some(elementA => !alreadySelectedActionList.value.some(elementA =>
element.tableName == elementA.tableName && element.act == elementA.act element.tableName == elementA.tableName && element.act == elementA.act
) ) || (row?.tableName == element.tableName && row.act == element.act)
); );
// MessageSet.allSchemas.formSchemacomponentProps.options // MessageSet.allSchemas.formSchemacomponentProps.options
const formItem = MessageSet.allSchemas.formSchema.find(element => element.field == 'act'); const formItem = formSchema.find(element => element.field == 'act');
if (formItem && formItem.componentProps) { if (formItem && formItem.componentProps) {
formItem.componentProps.options = actionList; formItem.componentProps.options = actionList;
formItem.componentProps.optionsAlias = { valueField: 'act', labelField: 'name' }; formItem.componentProps.optionsAlias = { valueField: 'act', labelField: 'name' };
} }
} basicFormRef.value.formLoading = false
}; });
});
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {

213
src/views/system/messageSet/messageSet.data.ts

@ -2,8 +2,23 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as TableActionRelApi from '@/api/system/tableActionRel' import * as TableActionRelApi from '@/api/system/tableActionRel'
import { getStrDictOptions } from '@/utils/dict' import { getStrDictOptions } from '@/utils/dict'
import * as SmsTemplateApi from '@/api/system/sms/smsTemplate'
import * as MailTemplate from '@/api/system/mail/template'
import * as NotifyTemplate from '@/api/system/notify/template'
const trueFalse = [{
value: true,
label: '是'
},
{
value: false,
label: '否'
}]
const smsTemplateList = await SmsTemplateApi.getSmsTemplateNoPage({})
const mailTemplateList = await MailTemplate.getMailTemplateNoPage({})
const notifyTemplateList = await NotifyTemplate.getNotifyTemplateNoPage({})
// 假设这是TableActionRelApi.getTableActionRelNoPage({})的返回类型 // 假设这是TableActionRelApi.getTableActionRelNoPage({})的返回类型
interface Table { interface Table {
tableName: string; tableName: string;
@ -51,6 +66,9 @@ export const MessageSetRules = reactive({
tableName: [required], tableName: [required],
act: [required], act: [required],
available: [required], available: [required],
smsTemplateId: [required],
emailTemplateId: [required],
internalMessageTemplateId: [required],
}) })
export const MessageSet = useCrudSchemas(reactive<CrudSchema[]>([ export const MessageSet = useCrudSchemas(reactive<CrudSchema[]>([
@ -127,15 +145,204 @@ export const MessageSet = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '短信模板是否启用',
field: 'smsTemplateEnabled',
sort: 'custom',
isSearch: true,
formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => {
return trueFalse.find(item=>cellValue==item.value).label
},
form: {
component: 'Switch',
componentProps: {
activeValue: true,
inactiveValue: false,
},
value: false,
},
search: {
component: 'Select',
componentProps: {
options: [{
value: true,
label: '是'
},
{
value: false,
label: '否'
}]
},
}
},
{
label: '短信模板',
field: 'smsTemplateId',
sort: 'custom',
isSearch: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return smsTemplateList.find(item => cellValue == item.id)?.name
},
form: {
component: 'Select',
componentProps: {
options: smsTemplateList,
optionsAlias: {
labelField: 'name',
valueField: 'id'
},
filterable: true,
disabled: true,
}
},
search: {component: 'Select',
componentProps: {
options: smsTemplateList,
optionsAlias: {
labelField: 'name',
valueField: 'id'
},
filterable: true,
}
},
},
{
label: '邮件模板是否启用',
field: 'emailTemplateEnabled',
sort: 'custom',
isSearch: true,
formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => {
return trueFalse.find(item=>cellValue==item.value).label
},
form: {
component: 'Switch',
componentProps: {
activeValue: true,
inactiveValue: false,
},
value: false,
},
search: {
component: 'Select',
componentProps: {
options: [{
value: true,
label: '是'
},
{
value: false,
label: '否'
}]
},
}
},
{
label: '邮件模板',
field: 'emailTemplateId',
sort: 'custom',
isSearch: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return mailTemplateList.find(item => cellValue == item.id)?.name
},
form: {
component: 'Select',
componentProps: {
options: mailTemplateList,
optionsAlias: {
labelField: 'name',
valueField: 'id'
},
filterable: true,
disabled: true,
}
},
search: {component: 'Select',
componentProps: {
options: mailTemplateList,
optionsAlias: {
labelField: 'name',
valueField: 'id'
},
filterable: true,
}
},
},
{
label: '内部消息模板是否启用',
field: 'internalMessageTemplateEnabled',
sort: 'custom',
isSearch: true,
formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => {
return trueFalse.find(item=>cellValue==item.value).label
},
form: {
component: 'Switch',
componentProps: {
inactiveValue: false,
activeValue: true,
},
value: false,
},
search: {
component: 'Select',
componentProps: {
options: [{
value: true,
label: '是'
},
{
value: false,
label: '否'
}]
},
}
},
{
label: '内部消息模板',
field: 'internalMessageTemplateId',
sort: 'custom',
isSearch: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return notifyTemplateList.find(item => cellValue == item.id)?.name
},
form: {
component: 'Select',
componentProps: {
options: notifyTemplateList,
optionsAlias: {
labelField: 'name',
valueField: 'id'
},
filterable: true,
disabled: true,
}
},
search: {component: 'Select',
componentProps: {
options: notifyTemplateList,
optionsAlias: {
labelField: 'name',
valueField: 'id'
},
filterable: true,
}
},
},
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
dictType: DICT_TYPE.FALSE_OR_TRUE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string',
form: { form: {
component: 'SelectV2', component: 'Switch',
componentProps: {
activeValue: 'TRUE',
inactiveValue: 'FALSE',
},
value: 'TRUE',
} }
}, },
{ {

2
src/views/system/tableActionRel/tableActionRel.data.ts

@ -76,7 +76,7 @@ export const TableActionRel = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
dictType: DICT_TYPE.FALSE_OR_TRUE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: { form: {
component: 'SelectV2', component: 'SelectV2',

233
src/views/wms/basicDataManage/itemManage/relegateRequest/index.vue

@ -0,0 +1,233 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="RelegateRequest.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="RelegateRequest.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="RelegateRequestRules"
:formAllSchemas="RelegateRequest.allSchemas"
:apiUpdate="RelegateRequestApi.updateRelegateRequest"
:apiCreate="RelegateRequestApi.createRelegateRequest"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="RelegateRequest.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/relegate-request/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { RelegateRequest,RelegateRequestRules } from './relegateRequest.data'
import * as RelegateRequestApi from '@/api/wms/relegateRequest'
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'
defineOptions({ name: 'RelegateRequest' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(RelegateRequest.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: RelegateRequestApi.getRelegateRequestPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:relegate-request:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:relegate-request:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:relegate-request:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:relegate-request:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:relegate-request:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
if (formType === 'create') {
await RelegateRequestApi.createRelegateRequest(data)
message.success(t('common.createSuccess'))
} else {
await RelegateRequestApi.updateRelegateRequest(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicRelegateRequest')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await RelegateRequestApi.deleteRelegateRequest(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await RelegateRequestApi.exportRelegateRequest(tableObject.params)
download.excel(data, '物料降级信息.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '物料降级信息导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await RelegateRequestApi.importTemplate()
})
</script>

243
src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequest.data.ts

@ -0,0 +1,243 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
// 表单校验
export const RelegateRequestRules = reactive({
itemCode: [required],
downItemCode: [required],
businessType: [required],
available: [required],
departmentCode: [required],
concurrencyStamp: [required],
})
export const RelegateRequest = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '降级后物料代码',
field: 'downItemCode',
sort: 'custom',
isSearch: true,
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
},
{
label: '从批次',
field: 'fromBatch',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从包装号',
field: 'fromPackingNumber',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从库区类型',
field: 'fromAreaTypes',
sort: 'custom',
isForm:false,
},
{
label: '从库区代码',
field: 'fromAreaCodes',
sort: 'custom',
isForm:false,
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
isForm:false,
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
},
{
label: '到批次',
field: 'toBatch',
sort: 'custom',
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
},
{
label: '到库区类型',
field: 'toAreaTypes',
sort: 'custom',
isForm:false,
},
{
label: '到库区代码',
field: 'toAreaCodes',
sort: 'custom',
isForm:false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isForm:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm:false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
isForm:false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm:false,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isForm:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '工作流流水号',
field: 'serialNumber',
isForm:false,
sort: 'custom',
},
{
label: '权限所属人员id',
field: 'ruleUserId',
sort: 'custom',
isForm:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

2
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -92,7 +92,6 @@ import { DeliverRequestMain,DeliverRequestMainRules,DeliverRequestDetail,Deliver
import * as DeliverRequestMainApi from '@/api/wms/deliverRequestMain' import * as DeliverRequestMainApi from '@/api/wms/deliverRequestMain'
import * as DeliverRequestDetailApi from '@/api/wms/deliverRequestDetail' import * as DeliverRequestDetailApi from '@/api/wms/deliverRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail'
// //
defineOptions({ name: 'DeliverRequestMain' }) defineOptions({ name: 'DeliverRequestMain' })
@ -103,7 +102,6 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const customerCode = ref()
const tableColumns = ref([...DeliverRequestMain.allSchemas.tableColumns,...DeliverRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref([...DeliverRequestMain.allSchemas.tableColumns,...DeliverRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true) const isShowButton = ref(true)

18
src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts

@ -4,6 +4,9 @@ import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import * as CustomerApi from '@/api/wms/customer' import * as CustomerApi from '@/api/wms/customer'
import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data' import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
import * as PackageunitApi from '@/api/wms/packageunit'
import { Packageunit } from '@/views/wms/basicDataManage/itemManage/packageunit/packageunit.data'
import * as ItembasicApi from '@/api/wms/itembasic' import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
@ -357,15 +360,20 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '包装规格', label: '包装规格',
field: 'packUnit', field: 'packUnit',
// dictType: DICT_TYPE.PACK_UNIT,
// dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
tableForm: { form: {
type: 'Select' // labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '包装规格信息', // 查询弹窗标题
searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类
searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法
}
} }
}, },
{ {

348
src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

@ -0,0 +1,348 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SaleShipmentMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SaleShipmentMain.allSchemas"
:detailAllSchemas="SaleShipmentDetail.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="SaleShipmentMainRules"
:formAllSchemas="SaleShipmentMain.allSchemas"
:tableAllSchemas="SaleShipmentDetail.allSchemas"
:tableFormRules="SaleShipmentDetailRules"
:tableData="tableData"
:apiUpdate="SaleShipmentMainApi.updateSaleShipmentMain"
:apiCreate="SaleShipmentMainApi.createSaleShipmentMain"
:isBusiness="true"
fromeWhere="SaleShipmentRequestMain"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="SaleShipmentMain.allSchemas"
:detailAllSchemas="SaleShipmentDetail.allSchemas"
:detailAllSchemasRules="SaleShipmentDetailRules"
:apiCreate="SaleShipmentDetailApi.createSaleShipmentDetail"
:apiUpdate="SaleShipmentDetailApi.updateSaleShipmentDetail"
:apiPage="SaleShipmentDetailApi.getSaleShipmentDetailPage"
:apiDelete="SaleShipmentDetailApi.deleteSaleShipmentDetail"
fromeWhere="SaleShipmentRequestDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailButtonIsShowAdd="trueFalse"
:detailButtonIsShowDelete="trueFalse"
@detailOpenForm="detailOpenForm"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/sale-shipment-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { SaleShipmentMain,SaleShipmentMainRules,SaleShipmentDetail,SaleShipmentDetailRules } from './saleShipmentMain.data'
import * as SaleShipmentMainApi from '@/api/wms/saleShipmentMain'
import * as SaleShipmentDetailApi from '@/api/wms/saleShipmentDetail'
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'
defineOptions({ name: 'SaleShipmentMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SaleShipmentMain.allSchemas.tableColumns)
// //
const trueFalse = ref(false)
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
row['soLine'] = val[0]['lineNumber']
row['soNumber'] = val[0]['number']
row['itemCode'] = val[0]['itemCode']
row['projectCode'] = val[0]['projectCode']
row['uom'] = val[0]['uom']
}else {
const setV = {}
if(formField == 'CustomerCode') {
setV['CustomerCode'] = val[0]['CustomerCode']
} else {
setV[formField] = val[0][searchField]
}
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
if(formField == 'soLine') {
setV['soLine'] = val[0]['lineNumber']
setV['soNumber'] = val[0]['number']
setV['itemCode'] = val[0]['itemCode']
setV['projectCode'] = val[0]['projectCode']
setV['uom'] = val[0]['uom']
}else {
setV[formField] = val[0][searchField]
}
formRef.setValues(setV)
})
}
const isShowButton = ref(true)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: SaleShipmentMainApi.getSaleShipmentMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:sale-shipment-main-request:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:sale-shipment-main-request:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:sale-shipment-main-request:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-request:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), //
]
const tableData = ref([])
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/**
* 详情 编辑页面打开
* @param row
*/
const detailOpenForm = (type) => {
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
let isExist = false
tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode))
if(rs.length > 1) isExist = true
})
if (isExist) {
basicFormRef.value.formLoading = false
return message.warning('物料代码重复')
}
try {
if (formType === 'create') {
if(tableData.value.length <= 0){
message.warning(`子表明细不能为空!`)
basicFormRef.value.formLoading = false
return;
}
await SaleShipmentMainApi.createSaleShipmentMain(data)
message.success(t('common.createSuccess'))
} else {
await SaleShipmentMainApi.updateSaleShipmentMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
//
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
SaleShipmentDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
//
const handleAddTable = () => {
let tableForm = JSON.parse(JSON.stringify(tableFormKeys))
tableData.value.push(tableForm)
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicSaleShipmentMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await SaleShipmentMainApi.deleteSaleShipmentMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SaleShipmentMainApi.exportSaleShipmentMain(tableObject.params)
download.excel(data, '销售发运申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '销售发运申请主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await SaleShipmentMainApi.importTemplate()
})
</script>

463
src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts

@ -0,0 +1,463 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as CustomerApi from '@/api/wms/customer'
import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
import * as SaleDetailApi from '@/api/wms/saleDetail'
import { SaleDetail } from '@/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
pageSize:10,
pageNo:1,
code:'DeliverRequest'
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
// 表单校验
export const SaleShipmentMainRules = reactive({
})
export const SaleShipmentMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isForm: false,
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isForm: false,
},
{
label: '发票时间',
field: 'invoiceTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '地点',
field: 'siteId',
sort: 'custom',
isSearch: true,
hiddenInMain: true,
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm: false,
},
{
label: '状态',
field: 'status',
sort: 'custom',
table: {
width: 150
},
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isForm:false,
},
{
label: '自动提交',
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
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',
value: requestsettingData.autoAgree,
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',
value: requestsettingData.autoExecute,
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',
value: requestsettingData.directCreateRecord,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const SaleShipmentDetailRules = reactive({
})
export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 180
},
isTable: false,
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
searchAllSchemas: SaleDetail.allSchemas,
searchPage: SaleDetailApi.getSaleDetailPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
searchAllSchemas: SaleDetail.allSchemas,
searchPage: SaleDetailApi.getSaleDetailPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
}
}
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: true,
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
isSearch: true,
isForm: false,
isTableForm: false
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
isSearch: true,
isForm: false,
isTableForm: false
},
{
label: '库存状态',
field: 'inventoryStatus',
// dictType: DICT_TYPE.INVENTORY_STATUS,
// dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
hiddenInMain: true,
isForm: false,
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
isSearch: true,
isTableForm: false
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTableForm: false
},
{
label: '物品描述1',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTableForm: false
},
{
label: '物品描述2',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTableForm: false
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
isSearch: true,
isTableForm: false,
hiddenInMain: true,
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isSearch: true,
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
isTableForm: false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
isTableForm: false
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

969
src/views/wms/moveManage/inventorymove/inventorymoveJobMain/inventorymoveJobMain.data.ts

File diff suppressed because it is too large

459
src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/inventorymoveRecordMain.data.ts

@ -33,106 +33,106 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isSearch: true isSearch: true
}, },
{ // {
label: '使用在途库', // label: '使用在途库',
field: 'useOnTheWayLocation', // field: 'useOnTheWayLocation',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ // {
label: '申请时间', // label: '申请时间',
field: 'requestTime', // field: 'requestTime',
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: '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: 'executeTime', // 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: 'activeDate', // field: 'activeDate',
formatter: dateFormatter2, // formatter: dateFormatter2,
detail: { // detail: {
dateFormat: 'YYYY-MM-DD' // dateFormat: 'YYYY-MM-DD'
}, // },
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 180 // width: 180
}, // },
form: { // form: {
component: 'DatePicker', // component: 'DatePicker',
componentProps: { // componentProps: {
style: {width: '100%'}, // style: {width: '100%'},
type: 'date', // type: 'date',
dateFormat: 'YYYY-MM-DD', // dateFormat: 'YYYY-MM-DD',
valueFormat: 'x', // valueFormat: 'x',
} // }
}, // },
}, // },
{ {
label: '从仓库代码', label: '从仓库代码',
field: 'fromWarehouseCode', field: 'fromWarehouseCode',
@ -149,44 +149,44 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{ // {
label: '从库区类型范围', // label: '从库区类型范围',
field: 'fromAreaTypes', // field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE, // dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string', // dictClass: 'string',
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '到库区类型范围', // label: '到库区类型范围',
field: 'toAreaTypes', // field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE, // dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string', // dictClass: 'string',
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '从库区代码范围', // label: '从库区代码范围',
field: 'fromAreaCodes', // field: 'fromAreaCodes',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '到库区代码范围', // label: '到库区代码范围',
field: 'toAreaCodes', // field: 'toAreaCodes',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ {
label: '出库事务类型', label: '出库事务类型',
field: 'outTransactionType', field: 'outTransactionType',
@ -211,61 +211,61 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{ // {
label: '部门', // label: '部门',
field: 'departmentCode', // field: 'departmentCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '接口类型', // label: '接口类型',
field: 'interfaceType', // field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE, // dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string', // dictClass: 'string',
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '备注', // label: '备注',
field: 'remark', // field: 'remark',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '创建时间', // label: '创建时间',
field: 'createTime', // field: 'createTime',
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: 'creator', // field: 'creator',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
// { // {
// label: '代码', // label: '代码',
// field: 'code', // field: 'code',
@ -274,26 +274,26 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
// width: 150 // width: 150
// }, // },
// }, // },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: true, // isSearch: true,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
])) ]))
//表单校验 //表单校验
@ -362,6 +362,7 @@ export const InventorymoveRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
hiddenInMain: true,
}, },
{ {
label: '物料代码', label: '物料代码',
@ -435,22 +436,22 @@ export const InventorymoveRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{ // {
label: '从器具号', // label: '从器具号',
field: 'fromContainerNumber', // field: 'fromContainerNumber',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '到器具号', // label: '到器具号',
field: 'toContainerNumber', // field: 'toContainerNumber',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ {
label: '数量', label: '数量',
field: 'qty', field: 'qty',

3
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -84,7 +84,6 @@ import { InventorymoveRequestMain,InventorymoveRequestMainRules,InventorymoveReq
import * as InventorymoveRequestMainApi from '@/api/wms/inventorymoveRequestMain' import * as InventorymoveRequestMainApi from '@/api/wms/inventorymoveRequestMain'
import * as InventorymoveRequestDetailApi from '@/api/wms/inventorymoveRequestDetail' import * as InventorymoveRequestDetailApi from '@/api/wms/inventorymoveRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { log } from 'console'
// //
defineOptions({ name: 'InventorymoveRequestMain' }) defineOptions({ name: 'InventorymoveRequestMain' })
@ -602,8 +601,6 @@ const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
let isExist = false let isExist = false
tableData.value.forEach(item => { tableData.value.forEach(item => {
console.log(item,777777777777);
let rs = tableData.value.filter(filterItem => (filterItem.fromPackingNumber == item.fromPackingNumber) ) let rs = tableData.value.filter(filterItem => (filterItem.fromPackingNumber == item.fromPackingNumber) )
console.log(rs,5666); console.log(rs,5666);
if(rs.length > 1) isExist = true if(rs.length > 1) isExist = true

664
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

@ -102,70 +102,6 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '申请时间',
field: 'requestTime',
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',
}
},
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: '从库区类型范围',
field: 'fromAreaTypes',
// dictType: DICT_TYPE.AREA_TYPE,
// dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{ {
label: '到仓库代码', label: '到仓库代码',
field: 'toWarehouseCode', field: 'toWarehouseCode',
@ -176,182 +112,8 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
}, },
{ {
label: '到库区类型范围', label: '申请时间',
field: 'toAreaTypes', field: 'requestTime',
// dictType: DICT_TYPE.AREA_TYPE,
// dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isSearch: true,
isForm: false,
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
form: {
value: 'Move',
componentProps: {
disabled: true
}
},
isForm: false,
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm: 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',
table: {
width: 150
},
isTable: false,
},
{
label: '自动提交',
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '自动通过',
field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoAgree,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '自动执行',
field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoExecute,
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',
value: requestsettingData.directCreateRecord,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '使用在途库',
field: 'useOnTheWayLocation',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -372,17 +134,8 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
}, },
{ {
label: '创建者', label: '截止时间',
field: 'creator', field: 'dueTime',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -400,17 +153,265 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x', valueFormat: 'x',
} }
}, },
isForm: false
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isForm: false
}, },
// {
// label: '从库区类型范围',
// field: 'fromAreaTypes',
// // dictType: DICT_TYPE.AREA_TYPE,
// // dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// isForm: false,
// },
// {
// label: '从库区代码范围',
// field: 'fromAreaCodes',
// sort: 'custom',
// table: {
// width: 150
// },
// isForm: false,
// },
// {
// label: '到库区类型范围',
// field: 'toAreaTypes',
// // dictType: DICT_TYPE.AREA_TYPE,
// // dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// isSearch: true,
// isForm: false,
// },
// {
// label: '到库区代码范围',
// field: 'toAreaCodes',
// sort: 'custom',
// table: {
// width: 150
// },
// isForm: false,
// },
// {
// label: '业务类型',
// field: 'businessType',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// value: 'Move',
// componentProps: {
// disabled: true
// }
// },
// isForm: false,
// },
// {
// label: '部门',
// field: 'departmentCode',
// sort: 'custom',
// isForm: 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',
// table: {
// width: 150
// },
// isTable: false,
// },
// {
// label: '自动提交',
// field: 'autoCommit',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// isForm: false,
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'Switch',
// value: requestsettingData.autoCommit,
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE',
// disabled: true
// }
// }
// },
// {
// label: '自动通过',
// field: 'autoAgree',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// isForm: false,
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'Switch',
// value: requestsettingData.autoAgree,
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE',
// disabled: true
// }
// }
// },
// {
// label: '自动执行',
// field: 'autoExecute',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// isForm: false,
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'Switch',
// value: requestsettingData.autoExecute,
// 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',
// value: requestsettingData.directCreateRecord,
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE',
// disabled: true
// }
// }
// },
// {
// label: '使用在途库',
// field: 'useOnTheWayLocation',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isSearch: true,
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
// {
// 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',
// }
// },
// isForm: false,
// },
// {
// label: '创建者',
// field: 'creator',
// sort: 'custom',
// table: {
// width: 150
// },
// 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',
// }
// },
// isForm: false
// },
// {
// label: '最后更新者',
// field: 'updater',
// sort: 'custom',
// table: {
// width: 150
// },
// isForm: false
// },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
@ -463,6 +464,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 180 width: 180
}, },
isTableForm: false, isTableForm: false,
hiddenInMain: true,
form: { form: {
componentProps: { componentProps: {
disabled: true disabled: true
@ -578,32 +580,32 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
}, },
{ // {
label: '从器具号', // label: '从器具号',
field: 'fromContainerNumber', // field: 'fromContainerNumber',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
disabled: true // disabled: true
}, // },
form: { // form: {
componentProps: { // componentProps: {
disabled: true // disabled: true
} // }
} // }
}, // },
{ // {
label: '到器具号', // label: '到器具号',
field: 'toContainerNumber', // field: 'toContainerNumber',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false, // isForm: false,
}, // },
{ {
label: '数量', label: '数量',
field: 'qty', field: 'qty',
@ -747,6 +749,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
}, },
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
hiddenInMain: true,
}, },
{ {
label: '到货主代码', label: '到货主代码',
@ -757,6 +760,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
}, },
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
hiddenInMain: true,
}, },
{ {
label: '项目代码', label: '项目代码',
@ -767,15 +771,16 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
}, },
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
hiddenInMain: true,
}, },
{ // {
label: '备注', // label: '备注',
field: 'remark', // field: 'remark',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -796,6 +801,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
valueFormat: 'x', valueFormat: 'x',
} }
}, },
hiddenInMain: true,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
@ -806,42 +812,43 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 150 width: 150
}, },
hiddenInMain: true,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
{ // {
label: '最后更新时间', // label: '最后更新时间',
field: 'updateTime', // field: 'updateTime',
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: {
style: { width:'100%'}, // style: { width:'100%'},
type: 'datetime', // type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', // dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', // valueFormat: 'x',
} // }
}, // },
isTableForm: false, // isTableForm: false,
isForm: false // isForm: false
}, // },
{ // {
label: '最后更新者', // label: '最后更新者',
field: 'updater', // field: 'updater',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false // isForm: false
}, // },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
@ -851,6 +858,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150, width: 150,
fixed: 'right' fixed: 'right'
}, },
hiddenInMain: true,
isTableForm:false, isTableForm:false,
} }
])) ]))

1
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -545,6 +545,7 @@ const submitForm = async (formType, data) => {
} }
try { try {
if (formType === 'create') { if (formType === 'create') {
data.productionLineCode = data.subList[0].productionLineCode;
await ProductreceiptRequestMainApi.createProductreceiptRequestMain(data) await ProductreceiptRequestMainApi.createProductreceiptRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {

1
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts

@ -15,6 +15,7 @@ export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive<CrudSchem
tableId: '', tableId: '',
tableName: 'SupplierdeliverInspectionDetail', tableName: 'SupplierdeliverInspectionDetail',
}, },
fileType:['pdf','png','jpg','jpeg'],
limit:1, limit:1,
fileSize:100 fileSize:100
} }

38
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue

@ -53,6 +53,31 @@
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
ref="detailRef" ref="detailRef"
:annexTable="[{
label: '质检明细',
prop: 'uploadFile',
tableName:'SupplierdeliverInspectionDetail',
hasSubDetail:true, //
showPreview:true, //
align:'left',
queryParams:[{
queryField:'tableId',
rowField:'annexMasterId',
}],
//
subDetailTableData:{
queryParams:[{
queryField:'masterId',
rowField:'annexMasterId',
}], //
getSubList:SupplierdeliverInspectionDetailApi.getSupplierdeliverInspectionDetailPage,//
tableColumns:SupplierdeliverInspectionDetail.allSchemas.tableColumns,
tableList:[],//
total:1,
pageSize:10,
currentPage:1,
}
}]"
:isBasic="false" :isBasic="false"
:allSchemas="SupplierdeliverRecordMain.allSchemas" :allSchemas="SupplierdeliverRecordMain.allSchemas"
:detailAllSchemas="SupplierdeliverRecordDetail.allSchemas" :detailAllSchemas="SupplierdeliverRecordDetail.allSchemas"
@ -79,10 +104,13 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import * as SupplierdeliverInspectionDetailApi from '@/api/wms/supplierdeliverInspectionDetail'
import {   SupplierdeliverInspectionDetail,SupplierdeliverInspectionDetailRules} from '../supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data'
import { SupplierdeliverRecordMain,SupplierdeliverRecordMainRules, import { SupplierdeliverRecordMain,SupplierdeliverRecordMainRules,
SupplierdeliverRecordDetail,SupplierdeliverRecordDetailRules,SupplierdeliverRecordDetailPickingNumer } from './supplierdeliverRecordMain.data' SupplierdeliverRecordDetail,SupplierdeliverRecordDetailRules,SupplierdeliverRecordDetailPickingNumer } from './supplierdeliverRecordMain.data'
import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain'
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail' import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail'
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
@ -197,9 +225,17 @@ const { getList:getDetailList } = detatableMethods
const { wsCache } = useCache() const { wsCache } = useCache()
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = async (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
//masterId
const { tableObject: requestTableObject, tableMethods:requestTableMethods } = useTable({
getListApi: SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage //
})
const { getList:requestGetList } = requestTableMethods
requestTableObject.params.number = 'REQ0120240506-0002'
await requestGetList()
row.annexMasterId = requestTableObject.tableList[0].masterId
detailRef.value.openDetail(row, titleName, titleValue,'recordSupplierdeliverMain') detailRef.value.openDetail(row, titleName, titleValue,'recordSupplierdeliverMain')
} }

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -82,6 +82,8 @@
prop: 'uploadFile', prop: 'uploadFile',
tableName:'SupplierdeliverInspectionDetail', tableName:'SupplierdeliverInspectionDetail',
hasSubDetail:true, // hasSubDetail:true, //
showPreview:true, //
fileType:['pdf','jpg','png','jpeg'],
align:'left', align:'left',
// //
subDetailTableData:{ subDetailTableData:{

10
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

@ -560,7 +560,7 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
}, },
}, },
{ {
label: '发货单号', label: '供应商发货单号',
field: 'asnBillNum', field: 'asnBillNum',
sort: 'custom', sort: 'custom',
table: { table: {
@ -699,6 +699,14 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
component: 'InputNumber', component: 'InputNumber',
} }
}, },
{
label: '凭证号',
field: 'voucherNumber',
sort: 'custom',
table: {
width: 150
}
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',

9
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -45,7 +45,6 @@
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" :tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:tableFormRules="SupplierinvoiceRequestDetailRules" :tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData" :tableData="tableData"
:sumFormDataByForm ="(formRef,formModel)=>{ :sumFormDataByForm ="(formRef,formModel)=>{
const {taxRate=0,amount=0} = formModel const {taxRate=0,amount=0} = formModel
formRef.value.setValues({ formRef.value.setValues({
@ -616,6 +615,14 @@ const handleImport = () => {
data.subList = tableData.value // data.subList = tableData.value //
try { try {
if (formType === 'create') { if (formType === 'create') {
if(data.subList.length == 0){
message.warning("请添明细数据")
return;
}
if(data.subList.length > 999){
message.warning("明细数据条数已超过最大数量限制【999条】")
return;
}
await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data) await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {

96
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -1,6 +1,9 @@
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 { accountantFormart } from '@/utils/formatter'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
@ -25,6 +28,32 @@ const requestsettingData = data?.list[0] || {}
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept] const userDeptArray:any = [userDept]
/**
* @returns {Array}
*/
export const PurchaseMemberInfo = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '用户编号',
field: 'id',
table: {
width: 180,
},
},
{
label: '用户名称',
field: 'username',
table: {
width: 180,
},
},
{
label: '用户昵称',
field: 'nickname',
table: {
width: 180,
},
}
]))
/** /**
* @returns {Array} 退 * @returns {Array} 退
@ -35,14 +64,14 @@ export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive<CrudS
field: 'billType' field: 'billType'
}, },
{ {
label: '物流单号', label: '物流收货单号',
field: 'recvBillNum', field: 'recvBillNum',
table: { table: {
width: 180, width: 180,
}, },
}, },
{ {
label: '发货单号', label: '供应商发货单号',
field: 'asnBillNum', field: 'asnBillNum',
table: { table: {
width: 180, width: 180,
@ -121,6 +150,17 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
} }
} }
}, },
{
label: '订单类型',
field: 'orderType',
dictType: DICT_TYPE.PURCHASE_ORDER_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
},
{ {
label: '供应商名称', label: '供应商名称',
field: 'supplierName', field: 'supplierName',
@ -152,6 +192,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
{ {
label: '金额', label: '金额',
field: 'amount', field: 'amount',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -183,6 +224,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
{ {
label: '税额', label: '税额',
field: 'taxAmount', field: 'taxAmount',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -203,6 +245,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
{ {
label: '税后金额', label: '税后金额',
field: 'afterTaxAmount', field: 'afterTaxAmount',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -224,6 +267,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
{ {
label: '索赔金额', label: '索赔金额',
field: 'claimAmount', field: 'claimAmount',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -247,6 +291,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
{ {
label: '折扣金额', label: '折扣金额',
field: 'discountAmount', field: 'discountAmount',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -283,6 +328,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
{ {
label: '总差额', label: '总差额',
field: 'totalDifference', field: 'totalDifference',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -407,7 +453,6 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
{ {
label: '创建者', label: '创建者',
field: 'creator', field: 'creator',
sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
@ -462,14 +507,30 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}, },
}, },
{ {
label: '采购审批人', label: '采购价格审批人',
field: 'procurementCreator', field: 'procurementCreator',
sort: 'custom',
sortTableDefault:1003, sortTableDefault:1003,
table: { table: {
width: 150 width: 150
}, },
isForm: false, isForm: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
hiddenFilterButton:true,//是否隐藏筛选按钮
searchListPlaceholder: '请选择采购员', // 输入框占位文本
searchField: 'id', // 查询弹窗赋值字段
searchTitle: '采购员信息', // 查询弹窗标题
searchAllSchemas: PurchaseMemberInfo.allSchemas, // 查询弹窗所需类
searchPage: SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode, // 查询弹窗所需分页方法
searchCondition: [{
key: 'roleCode', // 查询列表中字段
value: 'purchase', // 指查询具体值
isMainValue: false // 表示查询条件不是主表的字段的值
}]
}
}
}, },
{ {
label: '采购审批时间', label: '采购审批时间',
@ -690,6 +751,9 @@ export const SupplierinvoiceRequestMainRules = reactive({
remark: [ remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
procurementCreator: [
{ required: true, message: '请选择采购员', trigger: 'change' }
],
}) })
@ -733,6 +797,11 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
value: 'supplierCode', value: 'supplierCode',
message: '请填供应商信息!', message: '请填供应商信息!',
isMainValue: true isMainValue: true
},{
key: 'orderType',
value: 'orderType',
message: '请填订单类型!',
isMainValue: true
} }
] ]
} }
@ -751,12 +820,18 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
value: 'supplierCode', value: 'supplierCode',
message: '请填供应商信息!', message: '请填供应商信息!',
isMainValue: true isMainValue: true
},
{
key: 'orderType',
value: 'orderType',
message: '请填订单类型!',
isMainValue: true
} }
] ]
} }
}, },
{ {
label: '物流单据号', label: '物流收货单号',
field: 'recvBillNum', field: 'recvBillNum',
hiddenInMain:true, hiddenInMain:true,
table: { table: {
@ -787,7 +862,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
} }
}, },
{ {
label: '发货单号', label: '供应商发货单号',
field: 'asnBillNum', field: 'asnBillNum',
table: { table: {
width: 150 width: 150
@ -820,6 +895,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
{ {
label: '合同价格', label: '合同价格',
field: 'singlePrice', field: 'singlePrice',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -839,6 +915,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
{ {
label: '采购价格', label: '采购价格',
field: 'purchasePrice', field: 'purchasePrice',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -854,6 +931,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
{ {
label: '差额', label: '差额',
field: 'differencePrice', field: 'differencePrice',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -870,6 +948,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
{ {
label: '未税差额', label: '未税差额',
field: 'untaxedDifference', field: 'untaxedDifference',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -888,6 +967,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
{ {
label: '含税差额', label: '含税差额',
field: 'taxInclusiveDifference', field: 'taxInclusiveDifference',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },

Loading…
Cancel
Save