Browse Source

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

# Conflicts:
#	src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
master_hella_20240701
chenfang 6 months ago
parent
commit
f136a67cd4
  1. 21
      src/api/wms/purchaseprice/index.ts
  2. 21
      src/api/wms/supplieritem/index.ts
  3. 3
      src/utils/disposition/defaultButtons.ts
  4. 404
      src/views/qms/inspectionJob/addForm.vue
  5. 7
      src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue
  6. 7
      src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue
  7. 2
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
  8. 1
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  9. 1
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts
  10. 16
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

21
src/api/wms/purchaseprice/index.ts

@ -22,6 +22,17 @@ export const getPurchasepricePage = async (params) => {
}
}
// 查询采购价格单列表
export const getPurchasepricePageSCP = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/purchaseprice/seniorSCP', data })
} else {
return await request.get({ url: `/wms/purchaseprice/pageSCP`, params })
}
}
// 查询采购价格单详情
export const getPurchaseprice = async (id: number) => {
return await request.get({ url: `/wms/purchaseprice/get?id=` + id })
@ -52,6 +63,16 @@ export const exportPurchaseprice = async (params) => {
}
}
// 导出采购价格单 Excel
export const exportPurchasepriceSCP = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchaseprice/export-excel-senior-SCP`, data })
} else {
return await request.download({ url: `/wms/purchaseprice/export-excel-SCP`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchaseprice/get-import-template' })

21
src/api/wms/supplieritem/index.ts

@ -31,6 +31,17 @@ export const getSupplieritemPage = async (params) => {
}
}
// 查询供应商物料列表
export const getSupplieritemPageSCP = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/supplieritem/seniorSCP', data })
} else {
return await request.get({ url: `/wms/supplieritem/pageSCP`, params })
}
}
// 查询供应商物料详情
export const getSupplieritem = async (id: number) => {
return await request.get({ url: `/wms/supplieritem/get?id=` + id })
@ -61,6 +72,16 @@ export const exportSupplieritem = async (params) => {
}
}
// 导出供应商物料 Excel
export const exportSupplieritemSCP = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/supplieritem/export-excel-senior-SCP`, data })
} else {
return await request.download({ url: `/wms/supplieritem/export-excel-SCP`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplieritem/get-import-template' })

3
src/utils/disposition/defaultButtons.ts

@ -193,8 +193,7 @@ export function formStagingBtn(option:any) {
label: t(`btn.暂存`).replace('btn.', ''),
name: 'staging',
hide: false,
color: '',
color: 'green',
float:'right',
hasPermi: ''
})

404
src/views/qms/inspectionJob/addForm.vue

@ -1,13 +1,17 @@
<template>
<div>
<Dialog :title="dialogTitle" v-model="dialogVisible" :width="dialogWidth" :close-on-click-modal="false" :vLoading="formLoading">
<Dialog :title="dialogTitle" v-model="dialogVisible" :width="dialogWidth" :close-on-click-modal="false"
:vLoading="formLoading">
<div style="max-height: 80vh; overflow-y: auto; padding: 0px 20px">
<Form ref="formMainRef" :rules="rules" :schema="formSchema" :is-col="true" @opensearchTable="opensearchTable" />
<div class="small-title">包装列表</div>
<div style="border:1px solid #dedede;margin-bottom:20px;display: flex;">
<TableForm ref="tableFormRef" style="width:100%;" :maxHeight = "490" :tableFields="tableAllSchemas.tableFormColumns" :tableFormRules="tableFormRules" :tableData="data.packageList" :isShowButton="false" :isShowReduceButton="false" />
<TableForm ref="tableFormRef" style="width:100%;" :maxHeight="490"
:tableFields="tableAllSchemas.tableFormColumns" :tableFormRules="tableFormRules"
:tableData="data.packageList" :isShowButton="false" :isShowReduceButton="false" />
</div>
<el-tabs v-model="editableTabsValue" class="demo-tabs" @edit="handleTabsEdit" type="border-card" tab-position="left" :stretch="false">
<el-tabs v-model="editableTabsValue" class="demo-tabs" @edit="handleTabsEdit" type="border-card"
tab-position="left" :stretch="false">
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processDescribe" :name="item.name">
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
@ -39,7 +43,8 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.number" placeholder="根据系统生成" :disabled="true" />
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.number" placeholder="根据系统生成"
:disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -50,21 +55,24 @@
<el-col :span="12">
<el-form-item label="检验方法" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName" disabled placeholder="请选择检验方法" />
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName" disabled
placeholder="请选择检验方法" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采样过程编码" prop="inspectionJobCharacteristicsUpdateReqVO.samplingProcessCode">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName" disabled placeholder="请选择采样过程编码" />
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName" disabled
placeholder="请选择采样过程编码" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionJobCharacteristicsUpdateReqVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.sampleQty" disabled placeholder="请输入样品份数" />
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.sampleQty" disabled
placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
@ -72,7 +80,8 @@
<el-col :span="12">
<el-form-item label="每份样品量" prop="inspectionJobCharacteristicsUpdateReqVO.samplePieceSize">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize" disabled placeholder="请输入样品份数" />
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize" disabled
placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
@ -83,42 +92,52 @@
</el-col>
<el-col :span="12">
<el-form-item label="结果录入方式" prop="inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod">
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod" placeholder="请选择结果录入方式" @change="resultEntryMethodChange($event, item)" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)" :key="dict.value" :label="dict.label" :value="dict.value" />
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
placeholder="请选择结果录入方式" @change="resultEntryMethodChange($event, item)" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)"
:key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsUpdateReqVO.featureType">
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType" placeholder="请选择特征类型" @change="changeFeatureType" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE)" :key="dict.value" :label="dict.label" :value="dict.value" />
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType" placeholder="请选择特征类型"
@change="changeFeatureType" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime">
<el-date-picker v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime" type="datetime" placeholder="请选择开始时间" style="width: 100%" value-format="x" />
<el-date-picker v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
type="datetime" placeholder="请选择开始时间" style="width: 100%" value-format="x" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime">
<el-date-picker v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime" type="datetime" placeholder="请选择结束时间" style="width: 100%" value-format="x" />
<el-date-picker v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
type="datetime" placeholder="请选择结束时间" style="width: 100%" value-format="x" />
</el-form-item>
</el-col>
<!-- 手动评估的时候显示 -->
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1">
<el-form-item label="评估代码" required>
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.estimateCode" placeholder="请选择评估代码" @change="changeFeatureType">
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value" :label="dict.label" :value="dict.value" />
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.estimateCode" placeholder="请选择评估代码"
@change="changeFeatureType">
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList" :key="i" style="border: 1px solid #dedede; border-radius: 4px; padding-top: 16px; margin-bottom: 10px;">
<el-col :span="24"
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList" :key="i"
style="border: 1px solid #dedede; border-radius: 4px; padding-top: 16px; margin-bottom: 10px;">
<el-row>
<!-- 汇总录入的时候显示 -->
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1">
<el-form-item label="合格数量" required>
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" type="number"/>
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" type="number" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1">
@ -128,13 +147,15 @@
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'">
<el-form-item label="检验值" required>
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" type="number"/>
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" type="number" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'">
<el-form-item label="选定集" required>
<el-select v-model="cur.qualitativeCode" placeholder="请选择选定集" @change="changeQualitativeCode($event, item, cur)">
<el-option v-for="dict in item.selectedProjectRespVOList" :key="dict.dictionaryValue" :label="dict.dictionaryLabel" :value="dict.dictionaryValue" />
<el-select v-model="cur.qualitativeCode" placeholder="请选择选定集"
@change="changeQualitativeCode($event, item, cur)">
<el-option v-for="dict in item.selectedProjectRespVOList" :key="dict.dictionaryValue"
:label="dict.dictionaryLabel" :value="dict.dictionaryValue" />
</el-select>
</el-form-item>
</el-col>
@ -172,19 +193,19 @@
</div>
</template>
<script setup lang="ts">
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getCurrentInstance } from 'vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as InspectionJobDetailPageApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import { SearchTable } from '@/components/SearchTable'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getCurrentInstance } from 'vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as InspectionJobDetailPageApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import { SearchTable } from '@/components/SearchTable'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
const { proxy } = getCurrentInstance()
const { proxy } = getCurrentInstance()
const message = useMessage() //
const message = useMessage() //
const props = defineProps({
const props = defineProps({
//
basicFormWidth: {
type: String,
@ -237,22 +258,22 @@ const props = defineProps({
required: true,
default: null
},
})
const { t } = useI18n() //
})
const { t } = useI18n() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const dialogWidth = ref()
const formMainRef = ref()
const formFeaturesRef = ref()
const formProcessRef = ref()
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const dialogWidth = ref()
const formMainRef = ref()
const formFeaturesRef = ref()
const formProcessRef = ref()
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
const data = ref({
const data = ref({
code: '',
itemCode: '',
version: '',
@ -265,19 +286,19 @@ const data = ref({
expirationDate: '',
available: 'TRUE',
subList: []
})
})
const dialogVisibleName = ref(false)
const nameForm = ref({
const dialogVisibleName = ref(false)
const nameForm = ref({
name: ''
})
const nameRef = ref()
if (props.basicFormWidth) {
})
const nameRef = ref()
if (props.basicFormWidth) {
dialogWidth.value = props.basicFormWidth + '%'
} else {
} else {
dialogWidth.value = props.isBusiness ? '60%' : '40%'
}
const rules = ref({
}
const rules = ref({
...props.rules,
'inspectionJobCharacteristicsUpdateReqVO.description': [
{ required: true, message: '请填写描述', trigger: ['blur', 'change'] }
@ -322,18 +343,18 @@ const rules = ref({
{ required: true, message: '请输入样品份数', trigger: 'blur' }
],
qualifiedQuantity: [{ required: true, message: '请输入选择结束时间', trigger: 'blur' }]
})
const allSamplePieceSize = ref(0)
/** 打开弹窗 */
let tabIndex = 1
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => {
})
const allSamplePieceSize = ref(0)
/** 打开弹窗 */
let tabIndex = 1
const open = async (type : string, row ?: any, masterParmas ?: any, titleName ?: any) => {
if (titleName) {
dialogTitle.value = t('action.' + titleName)
} else {
dialogTitle.value = t('action.' + type)
}
formType.value = type
allSamplePieceSize.value =0//0
allSamplePieceSize.value = 0//0
if (row) {
data.value = JSON.parse(JSON.stringify(row))
// console.log(data.value)//
@ -395,19 +416,20 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
rules.value['inspectionJobCharacteristicsUpdateReqVO.estimateCode'][0].required = false
}
})
console.log(22,allSamplePieceSize.value )
console.log(22, allSamplePieceSize.value)
data.value.subList = list
/**
设置采样数量默认第一个包装采样数量<总数量显示数量字段第二个包装和剩下的总数量对比以此类推
第一个包装采样数量>总数量 则显示总数量
*/
for(let i = 0; i<data.value.packageList.length;i++){
if(allSamplePieceSize.value>data.value.packageList[i].amount){
for (let i = 0; i < data.value.packageList.length; i++) {
if (allSamplePieceSize.value > data.value.packageList[i].amount) {
data.value.packageList[i].sampleAmount = data.value.packageList[i].amount
allSamplePieceSize.value = parseFloat((allSamplePieceSize.value - data.value.packageList[i].amount).toFixed(2))
}else{
} else {
data.value.packageList[i].sampleAmount = allSamplePieceSize.value
allSamplePieceSize.value=0
allSamplePieceSize.value = 0
// return;
}
}
@ -436,13 +458,13 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
}
dialogVisible.value = true
tabIndex = data.value.subList.length + 1
}
defineExpose({ open, dialogVisible, formLoading }) // open
import type { TabPaneName } from 'element-plus'
}
defineExpose({ open, dialogVisible, formLoading }) // open
import type { TabPaneName } from 'element-plus'
const editableTabsValue = ref('1')
// const editableTabs = ref([])
const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' | 'add') => {
const editableTabsValue = ref('1')
// const editableTabs = ref([])
const handleTabsEdit = (targetName : TabPaneName | undefined, action : 'remove' | 'add') => {
if (action === 'add') {
nameForm.value.name = ''
dialogVisibleName.value = true
@ -462,9 +484,9 @@ const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' |
editableTabsValue.value = activeName
data.value.subList = tabs.filter((tab) => tab.name !== targetName)
}
}
/** 修改名称时间 */
const buttonBaseClick1 =async (val) => {
}
/** 修改名称时间 */
const buttonBaseClick1 = async (val) => {
//
if (val == 'save') {
if (!nameRef.value) return
@ -511,8 +533,8 @@ const buttonBaseClick1 =async (val) => {
else if (val == 'close') {
dialogVisibleName.value = false
}
}
const buttonBaseClick =async(val) => {
}
const buttonBaseClick = async (val) => {
//
if (val == 'save') {
submitForm()
@ -522,10 +544,14 @@ const buttonBaseClick =async(val) => {
// await InspectionJobMainApi.abandonInspectionJobMain(data.value.id)
dialogVisible.value = false
}
}
//
const emit = defineEmits(['submitForm', 'searchTableSuccess'])
const validateForm = (formRef) => {
//
else if (val == 'staging') {
staging()
}
}
//
const emit = defineEmits(['submitForm', 'searchTableSuccess'])
const validateForm = (formRef) => {
// console.log(TableBaseForm_Ref.value)
let _lists = formRef?.map((v) => v.validate())
return Promise.all(_lists)
@ -535,9 +561,9 @@ const validateForm = (formRef) => {
.catch(() => {
return false
})
}
const tableFormRef = ref()
const submitForm = async () => {
}
const tableFormRef = ref()
const submitForm = async () => {
try {
console.log(data.value.subList)
const elForm = unref(formMainRef)?.getElFormRef()
@ -547,12 +573,12 @@ const submitForm = async () => {
if (!valid) return
//
console.log(11,data.value.packageList)
if(data.value.packageList?.length>0){
console.log(11, data.value.packageList)
if (data.value.packageList?.length > 0) {
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return
let isPass = data.value.packageList.some(cur=>parseFloat(cur.sampleAmount)>parseFloat(cur.amount))
if(isPass){
let isPass = data.value.packageList.some(cur => parseFloat(cur.sampleAmount) > parseFloat(cur.amount))
if (isPass) {
message.error(`采样数量不能大于数量`)
return
}
@ -606,7 +632,7 @@ const submitForm = async () => {
)
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) {
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime > item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) {
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime)
}
//
@ -614,7 +640,7 @@ const submitForm = async () => {
parseFloatList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return String(cur.qualifiedQuantity).indexOf('.')>-1 || String(cur.unqualifiedQuantity).indexOf('.')>-1
return String(cur.qualifiedQuantity).indexOf('.') > -1 || String(cur.unqualifiedQuantity).indexOf('.') > -1
}
)
)
@ -622,31 +648,31 @@ const submitForm = async () => {
numberList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
console.log(12,cur.qualifiedQuantity)
console.log(13,cur.unqualifiedQuantity)
console.log(14,item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
console.log(12, cur.qualifiedQuantity)
console.log(13, cur.unqualifiedQuantity)
console.log(14, item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
}
)
)
}
})
let isEmpty1 = arrBol.some(item=>item == true)
let isEmptyNumberList = numberList.some(item=>item == true)
let isParseFloat = parseFloatList.some(item=>item == true)
if(isEmpty1){
let isEmpty1 = arrBol.some(item => item == true)
let isEmptyNumberList = numberList.some(item => item == true)
let isParseFloat = parseFloatList.some(item => item == true)
if (isEmpty1) {
message.error('检验工序和检验特性有字段未填写完全')
return;
}
if(isOutweigh?.length>0){
if (isOutweigh?.length > 0) {
message.error('检验特性中有开始时间大于结束时间')
return;
}
if(isParseFloat){
if (isParseFloat) {
message.error('合格数量和不合格数量之和不可以是小数')
return;
}
if(isEmptyNumberList){
if (isEmptyNumberList) {
message.error('合格数量和不合格数量之和必须等于样品份数')
return;
}
@ -660,28 +686,149 @@ const submitForm = async () => {
} catch {
console.log(111)
}
}
/** 弹窗按钮 */
let Butttondata: any = []
if (props.footButttondata) {
}
const staging = async () => {
try {
console.log(data.value.subList)
const elForm = unref(formMainRef)?.getElFormRef()
//
if (!elForm) return
const valid = await elForm.validate()
if (!valid) return
//
console.log(11, data.value.packageList)
if (data.value.packageList?.length > 0) {
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return
let isPass = data.value.packageList.some(cur => parseFloat(cur.sampleAmount) > parseFloat(cur.amount))
if (isPass) {
message.error(`采样数量不能大于数量`)
return
}
// let number = 0
// data.value.packageList.forEach(cur=>{
// number += parseFloat(cur.sampleAmount)
// })
// number = number.toFixed('2')
// if(number != data.value.sampleTotalAmount){
// message.error(``)
// return
// }
}
const bol2 = await validateForm(formFeaturesRef.value)
if (!bol2) {
message.error(`模板中有检验工序和检验特性未填写完全`)
return
}
//
let arrBol = []
let isOutweigh = []//
let numberList = []//
let parseFloatList = []//
data.value.subList.forEach((item, index) => {
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) {
arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.qualifiedQuantity || !cur.unqualifiedQuantity
}
)
)
}
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) {
arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.inspectionValue
}
)
)
}
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1) {
arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.qualitativeCode
}
)
)
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime > item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) {
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime)
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) {
parseFloatList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return String(cur.qualifiedQuantity).indexOf('.') > -1 || String(cur.unqualifiedQuantity).indexOf('.') > -1
}
)
)
//
numberList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
console.log(12, cur.qualifiedQuantity)
console.log(13, cur.unqualifiedQuantity)
console.log(14, item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
}
)
)
}
})
let isEmpty1 = arrBol.some(item => item == true)
let isEmptyNumberList = numberList.some(item => item == true)
let isParseFloat = parseFloatList.some(item => item == true)
if (isEmpty1) {
message.error('检验工序和检验特性有字段未填写完全')
return;
}
if (isOutweigh?.length > 0) {
message.error('检验特性中有开始时间大于结束时间')
return;
}
if (isParseFloat) {
message.error('合格数量和不合格数量之和不可以是小数')
return;
}
if (isEmptyNumberList) {
message.error('合格数量和不合格数量之和必须等于样品份数')
return;
}
await InspectionJobMainApi.stagingInspectionJobMain(data.value);
} catch {
console.log(111)
}
}
/** 弹窗按钮 */
let Butttondata : any = []
if (props.footButttondata) {
Butttondata = props.footButttondata
} else {
} else {
Butttondata = [
defaultButtons.formStagingBtn(null), //
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
//
const changeFeatureType = (e) => {
}
//
const changeFeatureType = (e) => {
console.log(e)
// if (e) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode'][0].required = true
// } else {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode'][0].required = false
// }
}
const searchTableRef = ref()
const opensearchTable = (
}
const searchTableRef = ref()
const opensearchTable = (
formField,
searchField,
searchTitle,
@ -691,12 +838,12 @@ const opensearchTable = (
multiple,
type,
row
) => {
) => {
const _searchCondition = {}
//
if (searchCondition && searchCondition.length > 0) {
//
let filters: any[] = []
let filters : any[] = []
for (var i = 0; i < searchCondition.length; i++) {
// searchCondition.forEach((item) => {
// row
@ -754,10 +901,10 @@ const opensearchTable = (
row,
_searchCondition
)
}
//
// val row
const searchTableSuccess = async (formField, searchField, val, type, row) => {
}
//
// val row
const searchTableSuccess = async (formField, searchField, val, type, row) => {
if (type == 'features') {
row.inspectionJobCharacteristicsUpdateReqVO[formField] = val[0].code
if (formField == 'inspectionMethodCode') {
@ -804,9 +951,9 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
}
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row)
}
//
const resultEntryMethodChange = (e, item) => {
}
//
const resultEntryMethodChange = (e, item) => {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
if (e == 0) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
@ -832,29 +979,30 @@ const resultEntryMethodChange = (e, item) => {
]
}
console.log(222, item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList)
}
//
const changeQualitativeCode = (e, item, cur) => {
}
//
const changeQualitativeCode = (e, item, cur) => {
let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e)
console.log(obj)
cur.defectLevel = obj.defectLevel
cur.estimateCode = obj.estimateCode
}
}
</script>
<style scoped>
.small-title {
.small-title {
font-weight: bold;
padding: 0px 10px 10px;
color: #1a8bfc;
font-size: 16px;
}
}
</style>
<style>
.el-tabs--left .el-tabs__header.is-left {
.el-tabs--left .el-tabs__header.is-left {
min-height: 700px !important;
min-width: 150px !important;
}
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {
}
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {
min-width: 120px !important;
}
}
</style>

7
src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue

@ -84,7 +84,7 @@ const updataTableColumns = (val) => {
}
const { tableObject, tableMethods } = useTable({
getListApi: PurchasepriceApi.getPurchasepricePage //
getListApi: routeName.value.includes('SCP')?PurchasepriceApi.getPurchasepricePageSCP:PurchasepriceApi.getPurchasepricePage //
})
//
@ -238,8 +238,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
if(routeName.value.includes('SCP')){
const data = await PurchasepriceApi.exportPurchasepriceSCP(tableObject.params)
download.excel(data, `${t('ts.采购价格单')}.xlsx`)
}else{
const data = await PurchasepriceApi.exportPurchaseprice(tableObject.params)
download.excel(data, `${t('ts.采购价格单')}.xlsx`)
}
} catch {
} finally {
exportLoading.value = false

7
src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue

@ -83,7 +83,7 @@ const updataTableColumns = (val) => {
}
const { tableObject, tableMethods } = useTable({
getListApi: SupplieritemApi.getSupplieritemPage //
getListApi: routeName.value.includes('SCP')?SupplieritemApi.getSupplieritemPageSCP:SupplieritemApi.getSupplieritemPage //
})
//
@ -237,8 +237,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
if(routeName.value.includes('SCP')){
const data = await SupplieritemApi.exportSupplieritemSCP(tableObject.params)
download.excel(data, `${t('ts.供应商物料')}.xlsx`)
}else{
const data = await SupplieritemApi.exportSupplieritem(tableObject.params)
download.excel(data, `${t('ts.供应商物料')}.xlsx`)
}
} catch {
} finally {
exportLoading.value = false

2
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue

@ -33,7 +33,7 @@
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>

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

@ -1031,7 +1031,6 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
},
{
label: '操作',
hiddenInMain:true,
field: 'action',
isDetail: false,
isForm: false ,

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

@ -552,7 +552,6 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
},
{
label: '操作',
hiddenInMain:true,
field: 'action',
isDetail: false,
isForm: false ,

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

@ -731,6 +731,20 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}
]))
const singlePriceFormart = (row, column, cellValue) => {
cellValue= Number(cellValue).toFixed(5)
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
}
function validateTaxRate(rule, value, callback) {
if (value>0) {
callback()
@ -913,7 +927,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
{
label: '合同价格',
field: 'singlePrice',
formatter: accountantFormart,
formatter: singlePriceFormart,
table: {
width: 150
},

Loading…
Cancel
Save