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. 186
      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: ''
})

186
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,37 +92,47 @@
</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">
@ -133,8 +152,10 @@
</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>
@ -401,6 +422,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
设置采样数量默认第一个包装采样数量<总数量显示数量字段第二个包装和剩下的总数量对比以此类推
第一个包装采样数量>总数量 则显示总数量
*/
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
@ -522,6 +544,10 @@ const buttonBaseClick =async(val) => {
// await InspectionJobMainApi.abandonInspectionJobMain(data.value.id)
dialogVisible.value = false
}
//
else if (val == 'staging') {
staging()
}
}
//
const emit = defineEmits(['submitForm', 'searchTableSuccess'])
@ -661,12 +687,133 @@ const submitForm = async () => {
console.log(111)
}
}
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 {
Butttondata = [
defaultButtons.formStagingBtn(null), //
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
@ -854,6 +1001,7 @@ const changeQualitativeCode = (e, item, cur) => {
min-height: 700px !important;
min-width: 150px !important;
}
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {
min-width: 120px !important;
}

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