Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

hella_online_20240829
gaojs 4 months ago
parent
commit
beeb16f365
  1. 67
      src/api/qms/inspectionQ1/index.ts
  2. 68
      src/api/qms/inspectionQ2/index.ts
  3. 68
      src/api/qms/inspectionQ3/index.ts
  4. 4
      src/api/wms/productionlineitem/index.ts
  5. 5
      src/api/wms/relegateRequestMain/index.ts
  6. 20
      src/components/ImportForm/src/ImportForm.vue
  7. 1
      src/locales/en-US.ts
  8. 1
      src/locales/zh-CN.ts
  9. 2
      src/utils/dict.ts
  10. 250
      src/views/qms/inspectionQ1/index.vue
  11. 352
      src/views/qms/inspectionQ1/inspectionQ1.data.ts
  12. 258
      src/views/qms/inspectionQ2/index.vue
  13. 395
      src/views/qms/inspectionQ2/inspectionQ2.data.ts
  14. 252
      src/views/qms/inspectionQ3/index.vue
  15. 328
      src/views/qms/inspectionQ3/inspectionQ3.data.ts
  16. 9
      src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts
  17. 146
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  18. 200
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  19. 1
      src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/customerreturnJobMain.data.ts
  20. 14
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  21. 128
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  22. 21
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts
  23. 1
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  24. 20
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts
  25. 12
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  26. 2
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts
  27. 2
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts

67
src/api/qms/inspectionQ1/index.ts

@ -0,0 +1,67 @@
import request from '@/config/axios'
export interface Q1VO {
id: number
number: string
customerCode: string
costCode: string
itemCode: string
qty: number
uom: string
code: string
priority: number
responUser: string
claimAmount: number
claimReason: number
claimTime: Date
handleTime: Date
desc: string
status: string
available: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询Q1通知单列表
export const getQ1Page = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/qms/inspectionQ1/senior', data })
} else {
return await request.get({ url: `/qms/inspectionQ1/page`, params })
}
}
// 查询Q1通知单详情
export const getQ1 = async (id: number) => {
return await request.get({ url: `/qms/inspectionQ1/get?id=` + id })
}
// 新增Q1通知单
export const createQ1 = async (data: Q1VO) => {
return await request.post({ url: `/qms/inspectionQ1/create`, data })
}
// 修改Q1通知单
export const updateQ1 = async (data: Q1VO) => {
return await request.put({ url: `/qms/inspectionQ1/update`, data })
}
// 删除Q1通知单
export const deleteQ1 = async (id: number) => {
return await request.delete({ url: `/qms/inspectionQ1/delete?id=` + id })
}
// 导出Q1通知单 Excel
export const exportQ1 = async (params) => {
return await request.download({ url: `/qms/inspectionQ1/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/qms/inspectionQ1/get-import-template' })
}

68
src/api/qms/inspectionQ2/index.ts

@ -0,0 +1,68 @@
import request from '@/config/axios'
export interface Q2VO {
id: number
number: string
supplierCode: string
itemCode: string
q1Number: string
purchaseReceiptNumber: string
qty: number
uom: string
code: string
desc: string
priority: number
responUser: string
claimAmount: number
costCode: string
claimTime: Date
handleTime: Date
status: string
available: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询Q2通知单列表
export const getQ2Page = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/qms/inspectionQ2/senior', data })
} else {
return await request.get({ url: `/qms/inspectionQ2/page`, params })
}
}
// 查询Q2通知单详情
export const getQ2 = async (id: number) => {
return await request.get({ url: `/qms/inspectionQ2/get?id=` + id })
}
// 新增Q2通知单
export const createQ2 = async (data: Q2VO) => {
return await request.post({ url: `/qms/inspectionQ2/create`, data })
}
// 修改Q2通知单
export const updateQ2 = async (data: Q2VO) => {
return await request.put({ url: `/qms/inspectionQ2/update`, data })
}
// 删除Q2通知单
export const deleteQ2 = async (id: number) => {
return await request.delete({ url: `/qms/inspectionQ2/delete?id=` + id })
}
// 导出Q2通知单 Excel
export const exportQ2 = async (params) => {
return await request.download({ url: `/qms/inspectionQ2/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/qms/inspectionQ2/get-import-template' })
}

68
src/api/qms/inspectionQ3/index.ts

@ -0,0 +1,68 @@
import request from '@/config/axios'
export interface Q3VO {
id: number
number: string
q1Number: string
itemCode: string
qty: number
code: string
uom: string
desc: string
defectLocation: string
defectType: string
problemReason: string
priority: number
responUser: string
amount: number
costCode: string
handleTime: Date
status: string
available: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询Q3通知单列表
export const getQ3Page = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/qms/inspectionQ3/senior', data })
} else {
return await request.get({ url: `/qms/inspectionQ3/page`, params })
}
}
// 查询Q3通知单详情
export const getQ3 = async (id: number) => {
return await request.get({ url: `/qms/inspectionQ3/get?id=` + id })
}
// 新增Q3通知单
export const createQ3 = async (data: Q3VO) => {
return await request.post({ url: `/qms/inspectionQ3/create`, data })
}
// 修改Q3通知单
export const updateQ3 = async (data: Q3VO) => {
return await request.put({ url: `/qms/inspectionQ3/update`, data })
}
// 删除Q3通知单
export const deleteQ3 = async (id: number) => {
return await request.delete({ url: `/qms/inspectionQ3/delete?id=` + id })
}
// 导出Q3通知单 Excel
export const exportQ3 = async (params) => {
return await request.download({ url: `/qms/inspectionQ3/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/qms/inspectionQ3/get-import-template' })
}

4
src/api/wms/productionlineitem/index.ts

@ -72,3 +72,7 @@ export const importTemplate = () => {
export const getProductionLineCodelistByCodes = async (params) => {
return await request.get({ url: `/wms/productionlineitem/listByCodes`, params })
}
export const selectItemCodeToProductionLineCode = async (itemCode: String) => {
return await request.get({ url: `/wms/productionlineitem/selectItemCodeToProductionLineCode?itemCode=` + itemCode })
}

5
src/api/wms/relegateRequestMain/index.ts

@ -96,3 +96,8 @@ export const agree = (id) => {
export const handle = (id) => {
return request.put({ url: '/wms/relegate-request-main/handle?id=' + id })
}
// 创建标签
export const relegateCreateLabel = async (data: RelegateRequestMainVO) => {
return await request.post({ url: `/wms/relegate-request-main/relegateCreateLabel`, data })
}

20
src/components/ImportForm/src/ImportForm.vue

@ -34,6 +34,18 @@
<div class="el-upload__text">{{t('ts.将文件拖到此处,或')}}<em>{{t('ts.点击上传')}}</em></div>
<template #tip>
<div class="el-upload__tip ml--126px mr--80px">
<div class="flex" v-if="announcements&&announcements.length>0">
<div
class="label h-32px ml-22px mr-26px color-#acaeb3 font-size-14px w-100px text-right mt-2px"
style="line-height: 32px;"
>{{t('ts.注意事项')}}</div
>
<div class="">
<div class="notice color-#acaeb3 font-size-14px text-red">
<div class="mt-2" v-for="item in announcements">{{ item }}</div>
</div>
</div>
</div>
<div class="flex">
<div
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right"
@ -209,6 +221,11 @@ const props = defineProps({
type: String,
required: false,
default: ''
},
announcements:{
type: Array,
required: false,
default: []
}
})
const importTemplateData = ref(props.importTemplateData)
@ -337,6 +354,9 @@ const importTemplate = () => {
</script>
<style scoped lang="scss">
.text-red{
color: var(--el-color-danger);
}
.tips {
div {
position: relative;

1
src/locales/en-US.ts

@ -924,6 +924,7 @@ export default {
:'Place',
'影响明细中物料代码,需在供应商物料中维护':'The material code in the details is affected , must be maintained in the supplier\'s material',
:'External resource or not',
:'Announcements',
:'Import Mode',
:'Please select content',
:'Please select condition',

1
src/locales/zh-CN.ts

@ -924,6 +924,7 @@ export default {
:'地点',
'影响明细中物料代码,需在供应商物料中维护':'影响明细中物料代码,需在供应商物料中维护',
:'是否外部资源',
:'注意事项',
:'导入模式',
:'请选择内容',
:'请选择条件',

2
src/utils/dict.ts

@ -290,6 +290,7 @@ export enum DICT_TYPE {
PL_MSTR_TYPE = 'pl_mstr_type', //产品类类型
TT_GLTYPE = 'tt_gltype', //账户类型
REPLY_STATUS = 'reply_status', //询证函回函状态
PRIORITY = 'priority', //优先级
// ========== 业务 - mes ==========
MESDO_STATUS = 'mes_do_status', // 工单执行状态
@ -385,4 +386,5 @@ export enum DICT_TYPE {
IS_LINE_ITEM = 'is_line_item', // 是否是线边
PUT_IN_TYPE = 'put_in_type', // 入库类型
PURCHASE_JOB_STATUS = 'purchase_job_status', // 采购收货任务状态
PUBLISHE_STATUS = 'publishe_status', // 采购收货任务状态
}

250
src/views/qms/inspectionQ1/index.vue

@ -0,0 +1,250 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Q1.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Q1.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="Q1Rules"
:formAllSchemas="Q1.allSchemas"
:apiUpdate="Q1Api.updateQ1"
:apiCreate="Q1Api.createQ1"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Q1.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/basic/Q1/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { Q1,Q1Rules } from './inspectionQ1.data'
import * as Q1Api from '@/api/qms/inspectionQ1'
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: 'InspectionQ1' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Q1.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if(formField == 'itemCode'){
console.log(val);
setV['uom'] = val[0]['customerUom']
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: Q1Api.getQ1Page //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn({hasPermi:'wms:q1:import'}), //
defaultButtons.defaultExportBtn(null), //
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:q1:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:q1: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) => {
var isHave =Q1.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await Q1Api.createQ1(data)
message.success(t('common.createSuccess'))
} else {
await Q1Api.updateQ1(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, 'basicQ1')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await Q1Api.deleteQ1(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 Q1Api.exportQ1(tableObject.params)
download.excel(data, 'Q1通知单.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'Q1通知单导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await Q1Api.importTemplate()
})
</script>

352
src/views/qms/inspectionQ1/inspectionQ1.data.ts

@ -0,0 +1,352 @@
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 CustomeritemApi from '@/api/wms/customeritem'
import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
// 表单校验
export const Q1Rules = reactive({
customerCode: [required],
costCode: [required],
itemCode: [required],
qty: [required],
code: [required],
priority: [required],
claimAmount: [required],
claimReason: [required],
claimTime: [required],
handleTime: [required]
})
export const Q1 = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '通知单号',
field: 'number',
sort: 'custom',
isForm: false,
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string',
isForm: false,
isSearch: false,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
isSearch: true
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '客户物料信息', // 查询弹窗标题
searchAllSchemas: Customeritem.allSchemas, // 查询弹窗所需类
searchPage: CustomeritemApi.getCustomeritemPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode',
message: '请填写客户代码!',
isMainValue: true
}
],
verificationParams: [
{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isTable: false,
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber'
}
},
{
label: '单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '编码',
field: 'code',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '优先级',
field: 'priority',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false
},
{
label: '索赔金额',
field: 'claimAmount',
sort: 'custom',
isTable: false,
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber'
}
},
{
label: '成本中心',
field: 'costCode',
sort: 'custom',
isSearch: false,
isTable: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心信息', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
}
},
{
label: '索赔原因',
field: 'claimReason',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '索赔日期',
field: 'claimTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
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: 'handleTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
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: 'desc',
sort: 'custom',
isSearch: false,
table: {
width: '150'
},
form: {
component: 'Input',
componentProps: {
type: 'textarea'
}
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
isSearch: true,
isForm: false,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
search: {
value: 'TRUE'
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
table: {
width: 110
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
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'
}
}
])
)

258
src/views/qms/inspectionQ2/index.vue

@ -0,0 +1,258 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Q2.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Q2.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="Q2Rules"
:formAllSchemas="Q2.allSchemas"
:apiUpdate="Q2Api.updateQ2"
:apiCreate="Q2Api.createQ2"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Q2.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/basic/Q2/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { Q2,Q2Rules } from './inspectionQ2.data'
import * as Q2Api from '@/api/qms/inspectionQ2'
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: 'InspectionQ2' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Q2.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if(formField == 'itemCode'){
console.log(val);
setV['uom'] = val[0]['supplierUom']
}
if (formField == 'q1Number') {
console.log(123)
setV['q1Number'] = val[0]['number']
}
// if (formField == 'supplierCode') {
// console.log(123)
// setV['supplierCode'] = val[0]['code']
// }
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: Q2Api.getQ2Page //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn({hasPermi:'wms:q2:import'}), //
defaultButtons.defaultExportBtn(null), //
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:q2:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:q2: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) => {
var isHave =Q2.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await Q2Api.createQ2(data)
message.success(t('common.createSuccess'))
} else {
await Q2Api.updateQ2(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, 'basicQ2')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await Q2Api.deleteQ2(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 Q2Api.exportQ2(tableObject.params)
download.excel(data, 'Q2通知单.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'Q2通知单导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await Q2Api.importTemplate()
})
</script>

395
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -0,0 +1,395 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as InspectionQ1Api from '@/api/qms/inspectionQ1'
import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
import { PurchasereceiptRecordMain1 } from '@/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data'
// 表单校验
export const Q2Rules = reactive({
number: [required],
supplierCode: [required],
itemCode: [required],
purchaseReceiptNumber: [required],
qty: [required],
code: [required],
priority: [required],
claimAmount: [required],
costCode: [required],
claimTime: [required],
handleTime: [required],
available: [required],
concurrencyStamp: [required]
})
export const Q2 = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '通知单号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 150,
fixed: 'left'
}
},
{
label: 'q1通知单号',
field: 'q1Number',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q1通知单', // 查询弹窗标题
searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
isSearch: true
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string',
isForm: false,
isSearch: false,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: true,
table: {
width: 175
},
form: {
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 190
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '供应商物料信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '采购收货单号',
field: 'purchaseReceiptNumber',
sort: 'custom',
table: {
width: 180
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
disabled: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择采购收货记录单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '采购收货记录', // 查询弹窗标题
searchAllSchemas: PurchasereceiptRecordMain1.allSchemas, // 查询弹窗所需类
searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
},
{
key: 'itemCode',
value: 'itemCode',
isMainValue: true
}
]
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isTable: false,
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber'
}
},
{
label: '编码',
field: 'code',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '优先级',
field: 'priority',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false
},
{
label: '索赔金额',
field: 'claimAmount',
sort: 'custom',
isTable: false,
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber'
}
},
{
label: '成本中心代码',
field: 'costCode',
sort: 'custom',
isSearch: false,
isTable: true,
isForm: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心信息', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
}
},
{
label: '索赔日期',
field: 'claimTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
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: 'handleTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
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: 'desc',
sort: 'custom',
isSearch: false,
table: {
width: '150'
},
form: {
component: 'Input',
componentProps: {
type: 'textarea'
}
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: false,
isForm: false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
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'
}
}
])
)

252
src/views/qms/inspectionQ3/index.vue

@ -0,0 +1,252 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Q3.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Q3.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="Q3Rules"
:formAllSchemas="Q3.allSchemas"
:apiUpdate="Q3Api.updateQ3"
:apiCreate="Q3Api.createQ3"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Q3.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/basic/Q3/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { Q3,Q3Rules } from './inspectionQ3.data'
import * as Q3Api from '@/api/qms/inspectionQ3'
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: 'InspectionQ3' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Q3.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if(formField == 'itemCode'){
console.log(val);
setV['uom'] = val[0]['customerUom']
}
if (formField == 'q1Number') {
console.log(123)
setV['q1Number'] = val[0]['number']
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: Q3Api.getQ3Page //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn({hasPermi:'wms:q3:import'}), //
defaultButtons.defaultExportBtn(null), //
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:q3:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:q3: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) => {
var isHave =Q3.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await Q3Api.createQ3(data)
message.success(t('common.createSuccess'))
} else {
await Q3Api.updateQ3(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, 'basicQ3')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await Q3Api.deleteQ3(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 Q3Api.exportQ3(tableObject.params)
download.excel(data, 'Q3通知单.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'Q3通知单导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await Q3Api.importTemplate()
})
</script>

328
src/views/qms/inspectionQ3/inspectionQ3.data.ts

@ -0,0 +1,328 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as InspectionQ1Api from '@/api/qms/inspectionQ1'
import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as CustomeritemApi from '@/api/wms/customeritem'
import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data'
// 表单校验
export const Q3Rules = reactive({
number: [required],
itemCode: [required],
qty: [required],
code: [required],
defectLocation: [required],
defectType: [required],
problemReason: [required],
priority: [required],
amount: [required],
costCode: [required],
handleTime: [required],
available: [required],
concurrencyStamp: [required]
})
export const Q3 = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '通知单号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 150,
fixed: 'left'
}
},
{
label: 'q1通知单号',
field: 'q1Number',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q1通知单', // 查询弹窗标题
searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
isSearch: true
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string',
isForm: false,
isSearch: false,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '客户物料信息', // 查询弹窗标题
searchAllSchemas: Customeritem.allSchemas, // 查询弹窗所需类
searchPage: CustomeritemApi.getCustomeritemPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode',
message: '请填写客户代码!',
isMainValue: true
}
],
verificationParams: [
{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isTable: false,
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber'
}
},
{
label: '单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '编码',
field: 'code',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '缺陷位置',
field: 'defectLocation',
sort: 'custom',
isSearch: false,
isTable: false
},
{
label: '缺陷类型',
field: 'defectType',
sort: 'custom',
isSearch: false,
isTable: false,
form: {
component: 'SelectV2'
}
},
{
label: '问题原因',
field: 'problemReason',
sort: 'custom',
isSearch: false,
isTable: false
},
{
label: '优先级',
field: 'priority',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false
},
{
label: '金额',
field: 'amount',
sort: 'custom',
isTable: false,
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber'
}
},
{
label: '成本中心代码',
field: 'costCode',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心信息', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
}
},
{
label: '处理时间',
field: 'handleTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
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: 'desc',
sort: 'custom',
isSearch: false,
table: {
width: '150'
},
form: {
component: 'Input',
componentProps: {
type: 'textarea'
}
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
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'
}
}
])
)

9
src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts

@ -6,6 +6,7 @@ import { Itembasic } from '../itembasic/itembasic.data'
// 表单校验
export const ProductionitemcodeSpareitemcodeRules = reactive({
productionItemCode: [required],
spareItemCode: [required],
available: [required],
})
@ -33,6 +34,10 @@ export const ProductionitemcodeSpareitemcode = useCrudSchemas(reactive<CrudSchem
key: 'category',
value: 'LCJ',
isMainValue: false
},{
key: 'type',
value: 'CCP',
isMainValue: false
}],
verificationParams: [{
key: 'code',
@ -68,6 +73,10 @@ export const ProductionitemcodeSpareitemcode = useCrudSchemas(reactive<CrudSchem
key: 'category',
value: 'BJ',
isMainValue: false
},{
key: 'type',
value: 'CCP',
isMainValue: false
}],
verificationParams: [{
key: 'code',

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

@ -67,7 +67,7 @@
ref="formLabelRef"
@success="getList"
:tableAllSchemas="detailListTableColumns"
:tableFormRules="ProductionreturnRequestDetailLabelRules"
:tableFormRules="RelegateRequestDetailLabelRules"
:tableData="detatableData.tableList"
:isBusiness="true"
:isShowButton="false"
@ -80,11 +80,13 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/relegate-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
<!-- 标签打印 -->
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { RelegateRequestMain, RelegateRequestMainRules, RelegateRequestDetail, RelegateRequestDetailRules } from './relegateRequestMain.data'
import { RelegateRequestMain, RelegateRequestMainRules, RelegateRequestDetail, RelegateRequestDetailRules,RelegateRequestDetailLabel,RelegateRequestDetailLabelRules } from './relegateRequestMain.data'
import * as RelegateRequestMainApi from '@/api/wms/relegateRequestMain'
import * as RelegateRequestDetailApi from '@/api/wms/relegateRequestDetail'
import * as ItembasicApi from '@/api/wms/itembasic'
@ -92,12 +94,11 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { ProductreceiptRequestLabel,ProductreceiptRequestLabelRules } from '../../../../productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data'
import * as ProductionitemcodeSpareitemcodeApi from '@/api/wms/productionitemcodeSpareitemcode'
import * as PackageApi from "@/api/wms/package";
import * as ProductionreturnRequestMainApi from '@/api/wms/productionreturnRequestMain'
import { ProductionreturnRequestMain,ProductionreturnRequestMainRules,ProductionreturnRequestDetail,ProductionreturnRequestDetailRules,ProductionreturnRequestDetailLabel,ProductionreturnRequestDetailLabelRules, SupplierdeliverRequestPackage } from '@/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts'
import * as ProductionreturnRequestDetailApi from '@/api/wms/productionreturnRequestDetail'
import { getAccessToken } from '@/utils/auth'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
defineOptions({ name: 'RelegateRequestMain' })
@ -111,12 +112,12 @@ routeName.value = route.name
const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns, ...RelegateRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true)
//
const detailListTableColumns = ProductionreturnRequestDetailLabel.allSchemas
const detailListTableColumns = RelegateRequestDetailLabel.allSchemas
const isCreateLabel = ref(false)
const formLabelRef = ref()
const labelType = ref('') //
const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({
getListApi: ProductionreturnRequestDetailApi.getProductionreturnRequestDetailPage
getListApi: RelegateRequestDetailApi.getRelegateRequestDetailPage
})
const { getList:getDetailList } = detatableMethods
//
@ -126,23 +127,53 @@ const submitFormLabel = async (formType, submitData) => {
data.id = data.masterId
}
try {
alert('做一下接口')
// detatableData.tableList.forEach(async (item) => {
// alert('')
console.log("aaaaa",data);
data.subList=detatableData.tableList
console.log("bbbbb",data);
// item.toLocationCode = item.fromLocationCode
// await PackageApi.createPackageLabel(item).then(() => {
// isCreateLabel.value = true
// message.success('')
// }).catch(err => {
// isCreateLabel.value = false
// console.log(err)
// message.error('')
// })
// })
await RelegateRequestMainApi.relegateCreateLabel(data).then(() => {
isCreateLabel.value = true
message.success('创建标签成功')
}).catch(err => {
isCreateLabel.value = false
console.log(err)
message.error('创建标签失败')
})
} finally {
formLabelRef.value.formLoading = false
formLabelRef.value.dialogVisible = false
}
}
//
const handlePoint = async (row) => {
//
await PackageApi.getPackagePage({
requestNumber: row.number
}).then((res) => {
if(res.list.length > 0) {
isCreateLabel.value = true
if (res.list[0].productionLineCode != null) {
labelType.value = 'zz'
} else {
labelType.value = 'cg'
}
} else {
isCreateLabel.value = false
}
}).catch(err => {
isCreateLabel.value = false
console.log(err)
})
//
if (isCreateLabel.value) {
labelPrint(row)
} else {
message.warning('请先创建标签')
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
@ -159,7 +190,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
newRow['fromBatch'] = item['batch']
newRow['fromPackingNumber'] = item['packingNumber']
newRow['toBatch'] = item['batch']
newRow['toPackingNumber'] = item['packingNumber']
newRow['fromLocationCode'] = item['locationCode']
newRow['inventoryStatus'] = item['inventoryStatus']
tableData.value.push(newRow)
@ -199,7 +229,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
// console.log(row['itemCode']);
// ItembasicApi.getItemListByCodes(row['itemCode'])
row['downItemCode'] = val[0]['code']
} else if (formField == 'toLocationCode') {
} else if(formField == 'packUnit'){
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']
}else if (formField == 'toLocationCode') {
row['toLocationCode'] = val[0]['code']
} else {
row[formField] = val[0][searchField]
@ -376,7 +409,7 @@ const butttondata = (row,$index) => {
color: '',
hasPermi: '',
link: true, //
}
},defaultButtons.mainListPointBtn({hide:isShowMainButton(row,['3','6','8'])}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:relegate-request-main:delete'}), //
]
}
@ -475,6 +508,8 @@ const buttonTableClick = async (val, row) => {
// dialogVisible.value = true
formLabelRef.value.open('create', row)
detatableData.tableList.map((item) => {
console.log(item);
// item.batch = '000000'
// 线
ItembasicApi.getItembasicPage({
@ -492,27 +527,31 @@ const buttonTableClick = async (val, row) => {
if(itemColumns.field == 'productionLineCodePackage') {
// itemColumns.tableForm.isInpuFocusShow = false
// itemColumns.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false
RelegateRequestDetailLabelRules.productionLineCodePackage[0].required = false
}
if(itemColumns.field == 'supplierItemCode') {
itemColumns.tableForm.isInpuFocusShow = true
itemColumns.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true
RelegateRequestDetailLabelRules.supplierItemCode[0].required = true
}
})
} else {
// tableform
detailListTableColumns.tableFormColumns.map(itemColumns => {
detailListTableColumns.tableFormColumns.map(async itemColumns => {
if(itemColumns.field == 'supplierItemCode') {
itemColumns.tableForm.isInpuFocusShow = false
itemColumns.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false
RelegateRequestDetailLabelRules.supplierItemCode[0].required = false
}
if(itemColumns.field == 'productionLineCodePackage') {
item.productionLineCodePackage = item.productionLineCode
let res = await ProductionlineitemApi.selectItemCodeToProductionLineCode(item.itemCode)
// let res = ProductionlineitemApi.selectItemCodeToProductionLineCode(item.itemCode)
console.log(res,999999999999999999999);
console.log(res[0],999999999999999999999);
item.productionLineCodePackage = res[0].productionLineCode
// itemColumns.tableForm.isInpuFocusShow = true
// itemColumns.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true
RelegateRequestDetailLabelRules.productionLineCodePackage[0].required = true
}
})
}
@ -523,6 +562,8 @@ const buttonTableClick = async (val, row) => {
})
})
}else if (val == 'point') { //
handlePoint(row)
}
}
@ -577,6 +618,34 @@ const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicRelegateRequestMain')
}
const BASE_URL = getJmreportBaseUrl()
//
const searchTableSuccess1 = async (formField, searchField, val, formRef, type, row) => {
console.log('批量打印',val)
// let rows:any = []
// val.forEach(item=>{
// rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
// })
if(val.length == 0){
message.warning("请先选择要打印的数据!")
return
}
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(','))
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => {
console.log(res)
if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res)
} else {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res)
}
}).catch(err => {
console.log(err)
message.error('创建标签失败')
})
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
@ -649,6 +718,27 @@ const searchFormClick = (searchData) => {
getList() //
}
const searchTableRef = ref()
const labelPrint = async (row) => {
tableObject.loading = true
const defaultParams = {'moduleName':'productreceipt_predict','recordNumber':row.number}
const {tableObject:tableObjectPrint ,tableMethods} = useTable({
defaultParams,
getListApi: PackageApi.getLabelDetailPage //
})
//
const { getList:getListPrint } = tableMethods
getListPrint()
tableObject.loading = false
const tableColumns = RelegateRequestDetailLabel.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
}
/** 初始化 **/
onMounted(async () => {
getList()

200
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts

@ -16,6 +16,9 @@ import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/l
import * as ItempackageApi from '@/api/wms/itempackage'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
import * as ProductionitemcodeSpareitemcodeApi from '@/api/wms/productionitemcodeSpareitemcode'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
@ -289,7 +292,7 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action',
isForm: false,
table: {
width: 200,
width: 250,
fixed: 'right'
},
isDetail:false
@ -509,17 +512,6 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
tableForm: {
disabled: true
},
table: {
width: 120
},
},
{
label: '到批次',
field: 'toBatch',
@ -726,9 +718,191 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
hiddenInMain:true,
table: {
width: 200,
width: 250,
fixed: 'right'
},
isTableForm: false
}
]))
/**
* @returns {Array}
*/
export const RelegateRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '批次',
field: 'fromBatch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '包装规格1',
field: 'packUnit',
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItempackageApi.getItempackagingPageByProductreceipt,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
enterSearch:true,
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItempackageApi.getItempackagingPageByProductreceipt,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
},
{
label: '包装数量1',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true,
}
}
]))
//表单校验
export const RelegateRequestDetailLabelRules = reactive({
})

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

@ -101,7 +101,6 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTable: false,
isSearch: true,
},
{
label: '车牌号',

14
src/views/wms/issueManage/issue/issueRequestMain/index.vue

@ -62,7 +62,16 @@
@onEnter="onEnter"
@onChange="onChange"
@clearSearchInput="onChange"
/>
:sumFormDataByTableCustom ="(formRef,formModel,tableData)=>{
tableData.forEach(item=>{
item.qty = item.qty1*item.packQty
})
}"
>
<template #default="{row}">
<el-input-number disabled v-model="row.qty"></el-input-number>
</template>
</BasicForm>
<!-- 详情 -->
<Detail
@ -176,6 +185,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['uom'] = item['uom']
tableData.value.push(newRow)
})
}else if(formField == 'packUnit'){
row['packQty'] = val[0]['packQty']
row[formField] = val[0][searchField]
} else {
row[formField] = val[0][searchField]
}

128
src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts

@ -10,7 +10,8 @@ import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/worksta
import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import * as ItempackagingApi from '@/api/wms/itempackage'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
@ -301,6 +302,21 @@ export const IssueRequestMain = useCrudSchemas(
}
}
},
{
label: '优先级',
field: 'priority',
dictType: DICT_TYPE.PRIORITY,
dictClass: 'string',
isSearch: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Select'
}
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
@ -880,26 +896,124 @@ export const IssueRequestDetail = useCrudSchemas(
isForm: false
},
{
label: '数量',
field: 'qty',
label: '包装规格',
field: 'packUnit',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'itemCode',
value: 'itemCode',
message: '请填写物料代码!',
isMainValue: true
}]
}
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch:true,
// isSearch:true,
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择包装规格', // 输入框占位文本
// searchField: 'itemCode', // 查询弹窗赋值字段
// searchTitle: '物料包装信息', // 查询弹窗标题
// searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
// searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// },{
// key: 'itemCode',
// value: 'itemCode',
// message: '请填写物料代码!',
// isMainValue: true
// }],
// verificationParams: [{
// key: 'packUnit',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// }
// }
},
{
label: '标包数',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
tableForm: {
disabled:true,
type: 'InputNumber',
min: 0,
precision: 6
precision: 0
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 0
}
}
},
{
label: '包装数',
field: 'qty1',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
tableForm: {
type: 'InputNumber',
min: 1,
precision: 0
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
precision: 0
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
tableForm: {
type: 'slot'
},
// form: {
// component: 'InputNumber',
// componentProps: {
// min: 0,
// precision: 6
// }
// }
},
{
label: '计量单位',
@ -1170,6 +1284,10 @@ export const IssueRequestDetailRules = reactive({
toLocationCode: [
{ required: true, message: '请输入到库位代码', trigger: 'blur' }
],
qty1: [
{ required: true, message: '请输入包装数量', trigger: 'blur' },
{ min: true, message: '包装数量不能小于1', trigger: 'blur' }
],
qty: [
{ required: true, message: '请输入数量', trigger: 'blur' }
],

21
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -836,6 +836,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
hiddenInMain: true,
sortTableDefault:9,
tableForm: {
disabled:true,
type: 'InputNumber',
min: 1,
precision: 6
@ -981,11 +982,19 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchPage: LocationApi.selectBusinessTypeToLocation, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'businessType',
value: 'PurchaseReceipt',
isMainValue: false
},{
key: 'isIn',
value: 'in',
isMainValue: false
}],
verificationParams: [{
key: 'code',
@ -1004,11 +1013,19 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchPage: LocationApi.selectBusinessTypeToLocation, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'businessType',
value: 'PurchaseReceipt',
isMainValue: false
},{
key: 'isIn',
value: 'in',
isMainValue: false
}],
verificationParams: [{
key: 'code',

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

@ -1398,7 +1398,6 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
isForm: false,
isTableForm:false,
isForm:false
},
// {
// label: '接口类型',

20
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts

@ -982,11 +982,19 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchPage: LocationApi.selectBusinessTypeToLocation, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'businessType',
value: 'PurchaseReceipt',
isMainValue: false
},{
key: 'isIn',
value: 'in',
isMainValue: false
}],
verificationParams: [{
key: 'code',
@ -1005,11 +1013,19 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchPage: LocationApi.selectBusinessTypeToLocation, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'businessType',
value: 'PurchaseReceipt',
isMainValue: false
},{
key: 'isIn',
value: 'in',
isMainValue: false
}],
verificationParams: [{
key: 'code',

12
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -97,7 +97,7 @@
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/purchase-plan-main/import" :importTemplateData="importTemplateData"
<ImportForm ref="importFormRef" url="/wms/purchase-plan-main/import" :importTemplateData="importTemplateData" :announcements = "announcements"
@success="importSuccess" :updateIsDisable="false" :appendIsDisable="true" :coverIsDisable="true" :mode="1" :coverIsShow="false" :appendIsShow="false"/>
<!-- 创建供应商发货申请 -->
<supplierdeliverBasicForm ref="supplierdeliverFormRef" @getList="getList" ></supplierdeliverBasicForm>
@ -117,6 +117,15 @@
import * as PurchaseMainApi from '@/api/wms/purchaseMain'
import { PurchaseMain } from '../purchaseMain/purchaseMain.data'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const { wsCache } = useCache()
const language = wsCache.get('lang')
const announcements = ref<any>([])
if('en-US'==language){
announcements.value = ["1. The total number of data items of the quantity of goods in the template does not exceed 1000 data (row × column).","2. All data content in the template is in text format, and formula content cannot be used as import data","3. The delivery date is in YYYY-MM-DD format, no hours, minutes and seconds are required"]
}else{
announcements.value = ["1. 模板中要货数量数据项总数不超过1000个数据(行×列)","2. 模板中全部数据内容格式为文本格式,不能使用公式内容作为导入数据","3. 要货日期为YYYY-MM-DD格式,不需填写时分秒"]
}
//
defineOptions({ name: 'PurchasePlanMain' })
@ -479,7 +488,6 @@ const getSearchTableData = async (number,formField,searchField)=>{
}
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {

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

@ -1508,7 +1508,7 @@ function validateTaxRate(rule, value, callback) {
export const SupplierinvoiceRequestMainRules = reactive({
taxRate: [
required,
{ validator:validateTaxRate, message: '税率必须大于0', trigger: 'blur'}
// { validator:validateTaxRate, message: '税率必须大于0', trigger: 'blur'}
],
supplierCode: [
{ required: true, message: '请选择供应商代码', trigger: 'change' }

2
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts

@ -1522,7 +1522,7 @@ function validateTaxRate(rule, value, callback) {
export const SupplierinvoiceRequestMainRules = reactive({
taxRate: [
required,
{ validator:validateTaxRate, message: '税率必须大于0', trigger: 'blur'}
// { validator:validateTaxRate, message: '税率必须大于0', trigger: 'blur'}
],
supplierCode: [
{ required: true, message: '请选择供应商代码', trigger: 'change' }

Loading…
Cancel
Save