Browse Source

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

master_hella_20240701
zhaoxuebing 8 months ago
parent
commit
e183ff2a08
  1. 29
      src/components/BasicForm/src/BasicForm.vue
  2. 60
      src/views/qms/basicDataManage/inspectionPlan/addForm.vue
  3. 39
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
  4. 4
      src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts
  5. 6
      src/views/qms/inspection/inspectionJob/index.vue
  6. 8
      src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts
  7. 5
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  8. 1
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

29
src/components/BasicForm/src/BasicForm.vue

@ -271,6 +271,16 @@ const props = defineProps({
type: Number, type: Number,
required: false, required: false,
default: 0 default: 0
},
//searchTable
/***[{
formField:form中对应的field,
valueField:searchtable中对应的field,
}]*/
sumFormData:{
type: Array,
required: false,
default: null
} }
}) })
@ -383,6 +393,25 @@ const opensearchTable = (
_searchCondition _searchCondition
) )
} }
const changeSumFormData = () => {
if(props.sumFormData){
const sumObject = {}
props.sumFormData.forEach(sumItem=>{
sumObject[sumItem?.formField]= props.tableData.reduce((prev, item) => prev + item[sumItem?.valueField],0)
})
nextTick(()=>{
formRef.value.setValues(sumObject)
})
}
}
watch(()=>props.tableData,() => {
changeSumFormData()
},{
deep:true
})
// //
// val row // val row
const searchTableSuccess = (formField, searchField, val, type, row) => { const searchTableSuccess = (formField, searchField, val, type, row) => {

60
src/views/qms/basicDataManage/inspectionPlan/addForm.vue

@ -18,7 +18,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物料编码" prop="itemCode"> <el-form-item label="物料编码" prop="itemCode">
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input v-model="data.itemCode" disabled placeholder="请选择物料编码" /> <el-input v-model="data.itemName" disabled placeholder="请选择物料编码" />
<el-button <el-button
type="info" type="info"
plain plain
@ -32,7 +32,7 @@
ItemBasicApi.getItembasicPage, ItemBasicApi.getItembasicPage,
null, null,
false, false,
'form', 'main',
null null
) )
" "
@ -49,7 +49,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="检验类型编码" prop="testTypeCode"> <el-form-item label="检验类型编码" prop="testTypeCode">
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input v-model="data.testTypeCode" disabled placeholder="请选择检验类型编码" /> <el-input v-model="data.testTypeName" disabled placeholder="请选择检验类型编码" />
<el-button <el-button
type="info" type="info"
plain plain
@ -63,7 +63,7 @@
SamplingProcessApi.getSamplingProcessPage, SamplingProcessApi.getSamplingProcessPage,
null, null,
false, false,
'form', 'main',
null null
) )
" "
@ -76,7 +76,7 @@
<el-form-item label="检验模板编码" prop="programmeTemplateCode"> <el-form-item label="检验模板编码" prop="programmeTemplateCode">
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="data.programmeTemplateCode" v-model="data.programmeTemplateName"
disabled disabled
placeholder="请选择检验模板编码" placeholder="请选择检验模板编码"
/> />
@ -93,7 +93,7 @@
InspectionTemplateApi.inspectionTemplatePage, InspectionTemplateApi.inspectionTemplatePage,
null, null,
false, false,
'form', 'main',
null null
) )
" "
@ -239,14 +239,14 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="检验方法编码" label="检验方法"
prop="inspectionCharacteristicsBaseVO.inspectionMethodCode" prop="inspectionCharacteristicsBaseVO.inspectionMethodCode"
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodCode" v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName"
disabled disabled
placeholder="请选择检验方法编码" placeholder="请选择检验方法"
/> />
<el-button <el-button
type="info" type="info"
@ -267,7 +267,7 @@
} }
], ],
false, false,
null, 'features',
item item
) )
" "
@ -279,11 +279,11 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="采样过程编码" label="采样过程编码"
prop="inspectionCharacteristicsBaseVO.dynamicUpdateCode" prop="inspectionCharacteristicsBaseVO.inspectionMethod"
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="item.inspectionCharacteristicsBaseVO.dynamicUpdateCode" v-model="item.inspectionCharacteristicsBaseVO.inspectionName"
disabled disabled
placeholder="请选择采样过程编码" placeholder="请选择采样过程编码"
/> />
@ -293,7 +293,7 @@
style="width: 40px" style="width: 40px"
@click=" @click="
opensearchTable( opensearchTable(
'dynamicUpdateCode', 'inspectionMethod',
null, null,
'采样过程编码', '采样过程编码',
SamplingProcess.allSchemas, SamplingProcess.allSchemas,
@ -306,7 +306,7 @@
} }
], ],
false, false,
null, 'features',
item item
) )
" "
@ -318,11 +318,11 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="动态修改规则编码" label="动态修改规则编码"
prop="inspectionCharacteristicsBaseVO.inspectionMethod" prop="inspectionCharacteristicsBaseVO.dynamicUpdateCode"
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethod" v-model="item.inspectionCharacteristicsBaseVO.dynamicUpdateName"
disabled disabled
placeholder="请选择动态修改规则编码" placeholder="请选择动态修改规则编码"
/> />
@ -332,7 +332,7 @@
style="width: 40px" style="width: 40px"
@click=" @click="
opensearchTable( opensearchTable(
'inspectionMethod', 'dynamicUpdateCode',
null, null,
'动态修改规则编码', '动态修改规则编码',
DynamicRule.allSchemas, DynamicRule.allSchemas,
@ -345,7 +345,7 @@
} }
], ],
false, false,
null, 'features',
item item
) )
" "
@ -1011,14 +1011,24 @@ const opensearchTable = (
// //
// val row // val row
const searchTableSuccess = async (formField, searchField, val, type, row) => { const searchTableSuccess = async (formField, searchField, val, type, row) => {
if (type == 'tableForm') { if(type == 'features'){
// row.inspectionCharacteristicsBaseVO[formField] = val[0].code
row[formField] = val[0][searchField] if(formField == 'inspectionMethodCode'){
} else { row.inspectionCharacteristicsBaseVO.inspectionMethodName = val[0].description
console.log(formField) }else if(formField == 'dynamicUpdateCode'){
console.log(val[0].code) row.inspectionCharacteristicsBaseVO.dynamicUpdateName = val[0].description
console.log(type) }else if(formField == 'inspectionMethod'){
row.inspectionCharacteristicsBaseVO.inspectionName = val[0].description
}
} else if(type == 'main'){
data.value[formField] = val[0].code data.value[formField] = val[0].code
if(formField == 'itemCode'){
data.value.itemName = val[0].name
}else if(formField == 'testTypeCode'){
data.value.testTypeName = val[0].description
}else if(formField == 'programmeTemplateCode'){
data.value.programmeTemplateName = val[0].description
}
if (formField == 'programmeTemplateCode') { if (formField == 'programmeTemplateCode') {
let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code) let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code)
list.forEach((item, index) => { list.forEach((item, index) => {

39
src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

@ -106,14 +106,14 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="检验方法编码" label="检验方法"
prop="inspectionCharacteristicsBaseVO.inspectionMethodCode" prop="inspectionCharacteristicsBaseVO.inspectionMethodCode"
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodCode" v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName"
disabled disabled
placeholder="请选择检验方法编码" placeholder="请选择检验方法"
/> />
<el-button <el-button
type="info" type="info"
@ -134,7 +134,7 @@
} }
], ],
false, false,
null, 'features',
item item
) )
" "
@ -146,11 +146,11 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="采样过程编码" label="采样过程编码"
prop="inspectionCharacteristicsBaseVO.dynamicUpdateCode" prop="inspectionCharacteristicsBaseVO.inspectionMethod"
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="item.inspectionCharacteristicsBaseVO.dynamicUpdateCode" v-model="item.inspectionCharacteristicsBaseVO.inspectionName"
disabled disabled
placeholder="请选择采样过程编码" placeholder="请选择采样过程编码"
/> />
@ -160,7 +160,7 @@
style="width: 40px" style="width: 40px"
@click=" @click="
opensearchTable( opensearchTable(
'dynamicUpdateCode', 'inspectionMethod',
null, null,
'采样过程编码', '采样过程编码',
SamplingProcess.allSchemas, SamplingProcess.allSchemas,
@ -173,7 +173,7 @@
} }
], ],
false, false,
null, 'features',
item item
) )
" "
@ -185,11 +185,11 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="动态修改规则编码" label="动态修改规则编码"
prop="inspectionCharacteristicsBaseVO.inspectionMethod" prop="inspectionCharacteristicsBaseVO.dynamicUpdateCode"
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethod" v-model="item.inspectionCharacteristicsBaseVO.dynamicUpdateName"
disabled disabled
placeholder="请选择动态修改规则编码" placeholder="请选择动态修改规则编码"
/> />
@ -199,7 +199,7 @@
style="width: 40px" style="width: 40px"
@click=" @click="
opensearchTable( opensearchTable(
'inspectionMethod', 'dynamicUpdateCode',
null, null,
'动态修改规则编码', '动态修改规则编码',
DynamicRule.allSchemas, DynamicRule.allSchemas,
@ -212,7 +212,7 @@
} }
], ],
false, false,
null, 'features',
item item
) )
" "
@ -813,14 +813,17 @@ const opensearchTable = (
// val row // val row
const searchTableSuccess = (formField, searchField, val, type, row) => { const searchTableSuccess = (formField, searchField, val, type, row) => {
console.log(row) console.log(row)
data.value.process.forEach((item) => { if(type == 'features'){
if (item.description == row.description) { row.inspectionCharacteristicsBaseVO[formField] = val[0].code
item.inspectionCharacteristicsBaseVO[formField] = val[0].code if(formField == 'inspectionMethodCode'){
row.inspectionCharacteristicsBaseVO.inspectionMethodName = val[0].description
}else if(formField == 'dynamicUpdateCode'){
row.inspectionCharacteristicsBaseVO.dynamicUpdateName = val[0].description
}else if(formField == 'inspectionMethod'){
row.inspectionCharacteristicsBaseVO.inspectionName = val[0].description
}
} }
})
// row.inspectionCharacteristicsBaseVO.inspectionMethodCode = val[0].code
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row)
} }
// //
const changeIsCapping = (e) => { const changeIsCapping = (e) => {

4
src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts

@ -151,11 +151,11 @@ export const InspectionTemplateFeatures= useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
},{ },{
label: '采样过程编码', label: '采样过程编码',
field: 'dynamicUpdateCode', field: 'inspectionMethod',
sort: 'custom', sort: 'custom',
},{ },{
label: '动态修改规则编码', label: '动态修改规则编码',
field: 'inspectionMethod', field: 'dynamicUpdateCode',
sort: 'custom', sort: 'custom',
},{ },{
label: '是否允许修改特征值', label: '是否允许修改特征值',

6
src/views/qms/inspection/inspectionJob/index.vue

@ -117,8 +117,8 @@
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn(null), // // defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultExportBtn(null), // defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -284,6 +284,6 @@
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate() // importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate()
}) })
</script> </script>

8
src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts

@ -5,18 +5,18 @@ import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '工序编号', label: '编码',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{ {
label: '申请编码', label: '申请单号',
field: 'inspectionCode', field: 'requestNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },

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

@ -43,6 +43,10 @@
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" :tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:tableFormRules="SupplierinvoiceRequestDetailRules" :tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData" :tableData="tableData"
:sumFormData = "[{
formField:'amount',
valueField:'singlePrice'
}]"
:apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain" :apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain"
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain" :apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain"
:isBusiness="true" :isBusiness="true"
@ -148,6 +152,7 @@
newRow['recvBillNum'] = item['recvBillNum'] newRow['recvBillNum'] = item['recvBillNum']
newRow['asnBillNum'] = item['asnBillNum'] newRow['asnBillNum'] = item['asnBillNum']
newRow['supplierCode'] = item['supplierCode'] newRow['supplierCode'] = item['supplierCode']
newRow['singlePrice'] = item['purchasePrice']// =
newRow['purchasePrice'] = item['purchasePrice'] newRow['purchasePrice'] = item['purchasePrice']
newRow['invoicableQuantity'] = item['invoicableQuantity'] newRow['invoicableQuantity'] = item['invoicableQuantity']
newRow['itemCode'] = item['itemCode'] newRow['itemCode'] = item['itemCode']

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

@ -148,6 +148,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: { componentProps: {
min: 0, min: 0,
precision: 6, precision: 6,
disabled: true,
} }
}, },
tableForm: { tableForm: {

Loading…
Cancel
Save