Browse Source

Merge branch 'hella_online_20240821' into hella_online_20240803

hella_online_20240823
陈薪名 3 months ago
parent
commit
87c1eadf6d
  1. 5
      src/api/qms/inspectionQ2/index.ts
  2. 1
      src/utils/dict.ts
  3. 124
      src/views/qms/inspectionQ2/index.vue
  4. 312
      src/views/qms/inspectionQ2/inspectionQ2.data.ts
  5. 7
      src/views/qms/inspectionRecordFirst/index.vue
  6. 2
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  7. 2
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue
  8. 17
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue

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

@ -71,3 +71,8 @@ export const importTemplate = () => {
export const finishQ2 = async (id: number) => {
return await request.get({ url: `/qms/inspectionQ2/finish?id=` + id })
}
// 获取系统中的email地址
export const getEmail = () => {
return request.get({ url: `/qms/inspectionQ2/getEmail`})
}

1
src/utils/dict.ts

@ -329,6 +329,7 @@ export enum DICT_TYPE {
DEFECT_LOCATION = 'defect_location', // 质量通知缺陷位置
DEFECT_TYPE = 'defect_type', // 质量通知缺陷类型
PROBLEM_REASON = 'problem_reason', // 质量通知问题原因
QMS_CLAIM_MULTIPLE = 'qms_claim_multiple', //质量通知索赔倍数
// ========== 业务 - mes -gaojs ==========
QUALIFY_STATUS = 'qualify_status', //质检状态

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

@ -103,6 +103,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(async () => {
const setV = {}
if (formField == 'supplierCode') {
setV['purchaseReceiptNumber'] = ''
const supplierParams = {
by: 'ASC',
filters: [{ column: 'code', action: '==', value: val[0].supplierCode }],
@ -119,18 +120,48 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
}
})
}
if (formField == 'purchaseReceiptNumber') {
let result = ''
for (var i = 0; i < val.length; i++) {
result += val[i].number + ','
}
if (result.endsWith(',')) {
result = result.substring(0, result.length - 1)
}
setV['purchaseReceiptNumber'] = '123'
}
if (formField == 'lightItemCode') {
setV['lightItemCode'] = val[0].code
setV['lightItemName'] = val[0].name
}
if (formField == 'itemCode') {
setV['SupplierCode'] = ''
setV['SupplierName'] = ''
setV['itemName'] = ''
setV['standardCostPrice'] = ''
setV['qty'] = ''
setV['claimAmount'] = ''
setV['lightQty'] = 0
setV['claimAmount'] = 0
setV['otherclaimAmount'] = 0
setV['summaryAmount'] = 0
setV['disbursementAmount'] = 0
setV['remainingAmount'] = 0
setV['purchaseReceiptNumber'] = ''
setV['uom'] = val[0].supplierUom
Q2Api.getEmail().then((res) => {
if (res) {
formRef.setValues({
cashierEmail: res
})
}
})
const supplieritemParams = {
by: 'ASC',
filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode}],
filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode }],
pageNo: 1,
pageSize: 500,
sort: ''
@ -154,6 +185,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
pageSize: 500,
sort: ''
}
itembasicParams.isSearch = true
ItembasicApi.getItembasicPage(itembasicParams).then((res) => {
if (res.list?.length > 0) {
@ -186,36 +218,71 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
}
const onChange = (field, e) => {
if (field == 'qty') {
if (field == 'lightQty') {
basicFormRef.value.formRef.formModel.claimAmount = (
parseFloat(basicFormRef.value.formRef.formModel.lightQty) *
parseFloat(basicFormRef.value.formRef.formModel.standardCostPrice) *
parseFloat(basicFormRef.value.formRef.formModel.claimMultiple)
).toFixed(6)
basicFormRef.value.formRef.formModel.summaryAmount = (
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) +
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6)
}
if (field == 'claimMultiple') {
basicFormRef.value.formRef.formModel.claimAmount = (
parseFloat(basicFormRef.value.formRef.formModel.qty) * parseFloat(basicFormRef.value.formRef.formModel.standardCostPrice)
parseFloat(basicFormRef.value.formRef.formModel.lightQty) *
parseFloat(basicFormRef.value.formRef.formModel.standardCostPrice) *
parseFloat(basicFormRef.value.formRef.formModel.claimMultiple)
).toFixed(6)
basicFormRef.value.formRef.formModel.summaryAmount = (
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
basicFormRef.value.formRef.formModel.summaryAmount = (
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) +
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6)
}
if (field == 'otherclaimAmount') {
basicFormRef.value.formRef.formModel.summaryAmount = (
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) +
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6)
}
if (field == 'supplierCode') {
basicFormRef.value.formRef.formModel.supplierName = ''
const paramsCustomer = {
by: 'ASC',
filters: [{ column: 'code', action: '==', value: basicFormRef.value.formRef.formModel.supplierCode }],
pageNo: 1,
pageSize: 500,
sort: ''
}
paramsCustomer.isSearch = true
SupplierApi.getSupplierPage(paramsCustomer).then((res) => {
if (res.list?.length > 0) {
basicFormRef.value.formRef.formModel.supplierName = res.list[0].name
}
})
if (field == 'claimAmount') {
basicFormRef.value.formRef.formModel.summaryAmount = (
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) +
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6)
basicFormRef.value.formRef.formModel.remainingAmount = (
parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) -
parseFloat(basicFormRef.value.formRef.formModel.disbursementAmount)
).toFixed(6)
}
if (field == 'disbursementAmount') {
basicFormRef.value.formRef.formModel.remainingAmount = (
parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) -
parseFloat(basicFormRef.value.formRef.formModel.disbursementAmount)
).toFixed(6)
}
if (field == 'supplierCode') {
basicFormRef.value.formRef.formModel.supplierName = ''
const paramsCustomer = {
by: 'ASC',
filters: [
{ column: 'code', action: '==', value: basicFormRef.value.formRef.formModel.supplierCode }
],
pageNo: 1,
pageSize: 500,
sort: ''
}
paramsCustomer.isSearch = true
SupplierApi.getSupplierPage(paramsCustomer).then((res) => {
if (res.list?.length > 0) {
basicFormRef.value.formRef.formModel.supplierName = res.list[0].name
}
})
}
}
//
@ -328,7 +395,8 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.formRef.setValues({
handleTime: new Date().getTime(),
claimTime: new Date().getTime(),
priority: '3'
priority: '3',
disbursementAmount: 0
})
})
}
@ -346,11 +414,11 @@ const formsSuccess = async (formType, data) => {
return
}
}
if (data.qty > data.wmsQty) {
if (data.lightQty > data.wmsQty) {
message.error('数量不能大于记录中的收货数量')
return
}
if (data.qty == 0) {
if (data.lightQty == 0) {
message.error('数量不能为0')
return
}

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

@ -10,30 +10,30 @@ 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 { PurchasereceiptRecordDetail } from '@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
// 表单校验
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]
itemCode: [{ required: true, message: '请选择供应商物料代码', trigger: 'change' }],
supplierCode: [{ required: true, message: '请选择供应商代码', trigger: 'change' }],
purchaseReceiptNumber: [{ required: true, message: '请选择采购收货单号', trigger: 'change' }],
claimTime: [{ required: true, message: '请选择索赔日期', trigger: 'change' }],
lightItemCode: [{ required: true, message: '请选择整灯物料代码', trigger: 'change' }],
lightQty: [{ required: true, message: '请选择整灯数量', trigger: 'change' }],
code: [{ required: true, message: '请选择缺陷代码', trigger: 'change' }],
priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
claimMultiple: [{ required: true, message: '请选择索赔倍数', trigger: 'change' }],
claimAmount: [{ required: true, message: '请输入索赔金额', trigger: 'change' }],
costCode: [{ required: true, message: '请选择选择成本中心代码', trigger: 'change' }],
cashierEmail: [{ required: true, message: '请选择选择出纳邮件地址', trigger: 'change' }],
handleTime: [{ required: true, message: '请选择选择处理时间', trigger: 'change' }]
})
export const Q2 = useCrudSchemas(
@ -50,7 +50,7 @@ export const Q2 = useCrudSchemas(
}
},
{
label: '物料代码',
label: '供应商物料代码',
field: 'itemCode',
sort: 'custom',
table: {
@ -72,6 +72,11 @@ export const Q2 = useCrudSchemas(
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'type',
value: 'Q2',
isMainValue: false
}
],
verificationParams: [
@ -88,7 +93,7 @@ export const Q2 = useCrudSchemas(
}
},
{
label: '物料名称',
label: '供应商物料名称',
field: 'itemName',
sort: 'custom',
dictClass: 'string',
@ -97,6 +102,9 @@ export const Q2 = useCrudSchemas(
tableForm: {
disabled: true
},
table: {
width: 150
},
form: {
componentProps: {
disabled: true
@ -113,6 +121,9 @@ export const Q2 = useCrudSchemas(
tableForm: {
disabled: true
},
table: {
width: 120
},
form: {
component: 'Select',
componentProps: {
@ -132,6 +143,9 @@ export const Q2 = useCrudSchemas(
dictClass: 'string',
isSearch: false,
isTable: true,
table: {
width: 180
},
tableForm: {
disabled: true
},
@ -152,8 +166,8 @@ export const Q2 = useCrudSchemas(
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
disabled: true,
multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择采购收货记录单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
@ -171,17 +185,7 @@ export const Q2 = useCrudSchemas(
value: 'itemCode',
isMainValue: true
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
]
}
}
},
@ -206,64 +210,73 @@ export const Q2 = useCrudSchemas(
}
}
},
{
label: '数量',
field: 'qty',
label: '整灯物料代码',
field: 'lightItemCode',
sort: 'custom',
isTable: true,
isSearch: false,
table: {
width: 150
},
isSearch: true,
form: {
component: 'InputNumber',
// labelMessage: '信息提示说明!!!',
componentProps: {
min: 0,
precision: 2
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'type',
value: 'CCP',
isMainValue: false
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '单位',
field: 'uom',
label: '整灯物料名称',
field: 'lightItemName',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '标准成本价格',
field: 'standardCostPrice',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
disabled: true
}
}
},
{
label: '索赔金额',
field: 'claimAmount',
label: '整灯数量',
field: 'lightQty',
sort: 'custom',
isTable: false,
isTable: true,
isSearch: false,
table: {
width: 150
@ -298,16 +311,72 @@ export const Q2 = useCrudSchemas(
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
dictClass: 'string',
isSearch: false,
isTable: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '索赔倍数',
field: 'claimMultiple',
sort: 'custom',
dictType: DICT_TYPE.QMS_CLAIM_MULTIPLE,
dictClass: 'string',
isTable: true,
isSearch: false,
table: {
width: 100
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {}
}
},
{
label: '标准成本价格',
field: 'standardCostPrice',
sort: 'custom',
isSearch: false,
isTable: true,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
disabled: true
}
}
},
{
label: '索赔金额',
field: 'claimAmount',
sort: 'custom',
isTable: true,
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
}
},
{
label: '其他索赔描述',
field: 'otherClaimDesc',
sort: 'custom',
isSearch: false,
isTable: true,
table: {
width: '150'
},
@ -321,6 +390,7 @@ export const Q2 = useCrudSchemas(
field: 'otherclaimAmount',
sort: 'custom',
isSearch: false,
isTable: true,
table: {
width: 150
},
@ -328,7 +398,7 @@ export const Q2 = useCrudSchemas(
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
precision: 6
}
}
},
@ -337,6 +407,7 @@ export const Q2 = useCrudSchemas(
field: 'summaryAmount',
sort: 'custom',
isSearch: false,
isTable: true,
table: {
width: 150
},
@ -350,39 +421,37 @@ export const Q2 = useCrudSchemas(
}
},
{
label: '成本中心代码',
field: 'costCode',
label: '抛账金额',
field: 'disbursementAmount',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: true,
isTable: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
component: 'InputNumber',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心信息', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
min: 0,
precision: 6
}
}
},
{
label: '剩余金额',
field: 'remainingAmount',
sort: 'custom',
isSearch: false,
isTable: true,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
disabled: true
}
}
},
@ -430,11 +499,63 @@ export const Q2 = useCrudSchemas(
},
isSearch: true
},
{
label: '成本中心代码',
field: 'costCode',
sort: 'custom',
isSearch: false,
isTable: true,
isForm: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心信息', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '出纳邮件地址',
field: 'cashierEmail',
sort: 'custom',
isSearch: false,
table: {
width: '150'
},
form: {
component: 'Input',
componentProps: {}
}
},
{
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false,
isTable: true,
isForm: true,
table: {
width: 120
@ -449,7 +570,7 @@ export const Q2 = useCrudSchemas(
{
label: '处理时间',
field: 'handleTime',
isTable: false,
isTable: true,
table: {
width: 180
},
@ -475,6 +596,7 @@ export const Q2 = useCrudSchemas(
dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string',
isForm: false,
isTable: true,
isSearch: false,
tableForm: {
type: 'Select',
@ -491,6 +613,7 @@ export const Q2 = useCrudSchemas(
field: 'desc',
sort: 'custom',
isSearch: false,
isTable: true,
table: {
width: '150'
},
@ -514,6 +637,7 @@ export const Q2 = useCrudSchemas(
label: '创建时间',
field: 'createTime',
isForm: false,
isTable: true,
table: {
width: 180
},

7
src/views/qms/inspectionRecordFirst/index.vue

@ -2,10 +2,7 @@
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionRecordMain.allSchemas.searchSchema" @search="setSearchParams"
@reset="setSearchParams({
available: true,
inspectionType:'11'
})"
@reset="setSearchParams"
/>
</ContentWrap>
@ -306,7 +303,7 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
tableObject.params = {
available: true,
available: 'TRUE',
inspectionType:'11'
}
getList()

2
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue

@ -198,7 +198,7 @@ const butttondata = (row,$index) => {
// defaultButtons.mainInspectRequestBtn({hasPermi:'wms:productreceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainInspectRequestBtn({hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListRecoveryBtn(null), //
// defaultButtons.mainListRecoveryBtn(null), //
]
}

2
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue

@ -236,7 +236,7 @@ const butttondata = (row,$index) => {
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainPutawayRequestCpBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),//
defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListRecoveryBtn(null), //
// defaultButtons.mainListRecoveryBtn(null), //
]
}

17
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue

@ -1,12 +1,13 @@
<template>
<el-dialog v-model="dialogTableVisible" title="标签" width="1100">
<el-table
<div v-loading="isLoading">
<el-table
:data="showTableData()"
border
row-key="id"
style="width: 1050px; max-height: 70vh; overflow-y: auto"
v-if="tableData.length > 0 && dialogTableVisible == true"
v-loading="isLoading"
>
<el-table-column type="expand" width="50">
<template #default="scope">
@ -173,10 +174,11 @@
layout="total, prev, pager, next, jumper"
:total="tableData.length"
/>
<template #footer>
<slot name="foorter"></slot>
<div style="text-align: right;margin-top:10px">
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template>
</div>
</div>
</el-dialog>
</template>
<script setup lang="ts">
@ -448,6 +450,11 @@ const addX = (oneRow, oneIndex, twoRow, twoIndex, type) => {
//
if (type == 1) {
//
//
if (parseFloat(twoRow.xNumber) == parseFloat(oneRow.otherNumber)) {
message.warning('每托箱个数最多' + oneRow.otherNumber + '箱')
return
}
twoRow.children.push({
id: twoId.value,
// xPoNumber:

Loading…
Cancel
Save