Browse Source

2024-04-03

master
zelian_wu 2 years ago
parent
commit
b3742cce5d
  1. 2
      src/api/base/properties.js
  2. 2
      src/api/dict.js
  3. 1
      src/api/test/testProperties.js
  4. 1819
      src/views/modules/base/propertiesItem/propertiesModel.vue
  5. 5
      src/views/modules/common/uploadFileList.vue
  6. 11
      src/views/modules/sys/dict-data-select.vue
  7. 2
      src/views/modules/test/file/testFile.vue
  8. 91
      src/views/modules/test/requestForTest.vue
  9. 154
      src/views/modules/test/testAttribute/testProperties.vue

2
src/api/base/properties.js

@ -47,4 +47,6 @@ export const updateBMModal= data => createAPI(`/technicalSpecification/updateBMM
export const searchMenuAllListId= (data) => createAPI(`/properties/menu/list`,'post',data)
export const searchBUList= (data) => createAPI(`/properties/bu/list`,'post',data)
export const searchPropertiesGroup= (data) => createAPI(`/properties/group/list`,'post',data)
export const searchBUPropertiesList= (data) => createAPI(`/bu/properties/list`,'post',data)
export const saveBUPropertiesList= (data) => createAPI(`/bu/properties/save`,'post',data)

2
src/api/dict.js

@ -42,7 +42,7 @@ export const updateDictType = (data) => createAPI(`/sys/dictType/update`,'post',
* @returns {*}
*/
export const selectDictDataPage = (no,size,data) =>createAPI(`/sys/dictData/${no}/${size}`,'get',data)
export const selectDictDataList = (data) =>createAPI(`/sys/dictData/list`,'get',data)
export const selectDictDataList = (data) =>createAPI(`/sys/dictData/list`,'post',data)
/**
* 新增字典数据
* @param data

1
src/api/test/testProperties.js

@ -3,3 +3,4 @@ import {createAPI} from "../../utils/httpRequest";
export const getTestPropertiesList = (data)=>createAPI(`/test/properties/list`,'post',data)
export const updateTestPropertiesList = (data)=>createAPI(`/test/properties/update`,'post',data)
export const searchTestPropertiesList = (data)=>createAPI(`/test/properties/search`,'post',data)
export const searchModalDetails = (data)=>createAPI(`/properties/searchModalDetails`,'post',data)

1819
src/views/modules/base/propertiesItem/propertiesModel.vue
File diff suppressed because it is too large
View File

5
src/views/modules/common/uploadFileList.vue

@ -27,6 +27,10 @@ export default {
fileList:{
type: Array,
default:()=>[],
},
folder:{
type:String,
default:''
}
},
data(){
@ -66,6 +70,7 @@ export default {
data.append("orderRef2",this.no)
data.append("createBy",this.$store.state.user.name)
data.append("fileRemark",this.fileRemark)
data.append("folder", this.folder)
uploadFileList(this.path,data).then(({data})=>{
if (data && data.code === 0){
this.$emit('update:uploadDialog',false)

11
src/views/modules/sys/dict-data-select.vue

@ -21,7 +21,10 @@ export default {
props:{
dictType: {
type: String,
required: true
},
dictTypeList:{
type:Array,
default:()=>[],
},
value:{
required: true,
@ -62,7 +65,8 @@ export default {
//
let params = {
site:this.useSite?this.$store.state.user.site:"*",
dictType:this.dictType
dictType:this.dictType,
dictTypeList: this.dictTypeList
}
try {
//
@ -70,6 +74,9 @@ export default {
//
if (data && data.code === 0){
this.options = data.rows;
if (this.options.length === 0){
this.$emit("change",'')
}
}
if (this.useDefaultValue){
this.dictDefaultValue();

2
src/views/modules/test/file/testFile.vue

@ -135,7 +135,7 @@ export default {
</template>
</el-table-column>
</el-table>
<upload-file-list :label="'测试单号:'" :file-list.sync="fileList" :no="testNo" :upload-dialog.sync="uploadDialog" path="/upload/test"></upload-file-list>
<upload-file-list folder="testFile" :label="'测试单号:'" :file-list.sync="fileList" :no="testNo" :upload-dialog.sync="uploadDialog" path="/upload/test"></upload-file-list>
</div>
</template>

91
src/views/modules/test/requestForTest.vue

@ -262,30 +262,27 @@
</el-col>
</el-row>
</el-col>
<el-col :span="4">
<el-form-item label=" ">
<el-checkbox v-model="modalData.doesNeedArtwork" true-label="Y">是否需要Artwork</el-checkbox>
<el-col :span="4" :offset="8">
<el-form-item label="设计师">
<span slot="label"><a herf="#" @click="getBaseList(2003)">设计师</a></span>
<el-input v-model="modalData.artworkName"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label=" ">
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label=" ">
<el-checkbox v-model="modalData.doesNeedPlanner" true-label="Y">是否需要计划</el-checkbox>
<el-form-item label="计划员">
<span slot="label"><a herf="#" @click="getBaseList(2004)">计划员</a></span>
<el-input v-model="modalData.plannerName"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="12">
<el-col :span="12" v-if="false">
<el-form-item style="height: 90px">
<span slot="label" @click="getCustomerAddressList"><a>送样地址</a></span>
<el-input type="textarea" v-model="modalData.sendSamplesAddress" :rows="3" resize='none'></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12" v-if="false">
<el-form-item label="备注" style="height: 90px">
<el-input type="textarea" v-model="modalData.remark" :rows="3" resize='none'></el-input>
</el-form-item>
@ -299,6 +296,12 @@
</el-form>
<div class="rq">
<el-tabs v-model="activeTab" @tab-click="dialogTabClick">
<el-tab-pane label="基本信息" :disabled="!activeTabList.includes('attribute')" name="attribute" v-if="modalData.flag !== '1'">
<test-properties v-if="modalFlag" v-model:data-list="testPropertiesList" ref="dialogTestAttribute" :test-no="modalData.testNo"></test-properties>
</el-tab-pane>
<el-tab-pane label="基本信息" :disabled="!activeTabList.includes('attribute')" name="attribute" v-else>
<test-properties v-if="modalFlag" :show-save-button="modalData.flag !== '1'" v-model:data-list="copyTestPropertiesList" ref="dialogTestAttribute" :test-no="modalData.testNo"></test-properties>
</el-tab-pane>
<el-tab-pane label="物料属性" :disabled="!activeTabList.includes('partAttribute')" name="partAttribute">
<test-attribute v-if="modalFlag" :attribute-list="dialogProperties" ref="dialogAttribute" :test-no="modalData.testNo"></test-attribute>
</el-tab-pane>
@ -371,9 +374,6 @@
<el-tab-pane label="制程信息" :disabled="!activeTabList.includes('process')" name="process">
<test-routing-table v-if="clickTestRow" ref="dialogSoRouting" v-model:data-list="testSoRoutingList" :test-no="modalData.testNo"></test-routing-table>
</el-tab-pane>
<el-tab-pane label="基本信息" :disabled="!activeTabList.includes('attribute')" name="attribute">
<test-properties v-if="modalFlag" v-model:data-list="testPropertiesList" ref="dialogTestAttribute" :test-no="modalData.testNo"></test-properties>
</el-tab-pane>
<el-tab-pane label="附件" :disabled="!activeTabList.includes('file')" name="file">
<test-file v-if="modalFlag" :column-list="fileColumnList" v-model:data-list="testFileList" ref="dialogTestFile" :test-no="modalData.testNo"></test-file>
</el-tab-pane>
@ -696,6 +696,9 @@
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane label="基本信息" name="attribute">
<test-properties ref="tabProperties" v-model:data-list="testPropertiesList" :test-no="testCurrentRow.testNo" :height="500"></test-properties>
</el-tab-pane>
<el-tab-pane label="物料属性" name="test_attribute" style="padding: 5px">
<test-attribute ref="tabAttribute" :attribute-list="attributeList" :test-no="testCurrentRow.testNo" :height="500"></test-attribute>
</el-tab-pane>
@ -705,9 +708,6 @@
<el-tab-pane label="制程信息" name="test_so_routing" style="padding: 5px">
<test-routing-table ref="tabSoBom" :test-no="testCurrentRow.testNo" v-model:data-list="testSoRoutingList" :height="500" ></test-routing-table>
</el-tab-pane>
<el-tab-pane label="基本信息" name="attribute">
<test-properties ref="tabProperties" v-model:data-list="testPropertiesList" :test-no="testCurrentRow.testNo" :height="500"></test-properties>
</el-tab-pane>
<el-tab-pane label="附件" name="file">
<test-file ref="tabFile" :column-list="fileColumnList" v-model:data-list="testFileList" :test-no="testCurrentRow.testNo" :height="500"></test-file>
</el-tab-pane>
@ -1048,7 +1048,7 @@
</el-dialog>
<!-- 上传文件的modal -->
<testUploadFile ref="testUploadFile" @refreshPageTables="getFileContentData()" v-drag></testUploadFile>
<test-upload-file ref="testUploadFile" @refreshPageTables="getFileContentData()" v-drag></test-upload-file>
</div>
</template>
@ -1079,14 +1079,9 @@
customerContactSearch, //
} from '@/api/customer/customerContact.js'
import ChooseList from '@/views/modules/common/Chooselist'
import testUploadFile from "./test_upload_file"
import TestUploadFile from "./test_upload_file"
import DictDataSelect from "../sys/dict-data-select.vue";
import {
selectTestSoBom,
saveTestSoBom,
removeTestSoBom,
updateTestSoBom
} from "../../../api/test/testSoBom";
import {selectTestSoBom,} from "../../../api/test/testSoBom";
import TestTable from "./testSoBom/testTable.vue";
import TestRoutingTable from "./testSoRouting/testRoutingTable.vue";
import {selectTestSoRoutingList} from "../../../api/test/testSoRouting";
@ -1105,7 +1100,7 @@
TestTable,
DictDataSelect,
ChooseList,
testUploadFile
TestUploadFile
},
watch: {
searchData: {
@ -1159,8 +1154,9 @@
testSoRoutingList:[],
testSoBomList:[],
testPropertiesList:[],
activeTab:'partAttribute',
activeTabList:['partAttribute'],
copyTestPropertiesList:[],
activeTab:'attribute',
activeTabList:['attribute'],
clickTestRow:false,
//
exportData: [],
@ -1197,7 +1193,7 @@
//
dataListLoading: false,
//
activeTable: 'test_attribute',
activeTable: 'attribute',
// ======== ========
modalData: {
flag: '1',
@ -1217,7 +1213,11 @@
priorityLevel: '一般',
testNumber: 1,
doesNeedArtwork:'',
artwork:'',
artworkName:'',
doesNeedPlanner:'',
planner:'',
plannerName:'',
requiredDeliveryDate: '',
remark: '',
technicalConsiderations: '',
@ -2327,7 +2327,11 @@
projectName: row.projectName,
tracker: row.tracker,
doesNeedArtwork:row.doesNeedArtwork,
artwork:row.artwork,
artworkName:row.artworkName,
doesNeedPlanner:row.doesNeedPlanner,
planner: row.planner,
plannerName: row.plannerName,
trackerName: row.trackerName,
testPartNo: row.testPartNo,
partName: row.partName,
@ -2495,7 +2499,7 @@
if (data && data.code === 0) {
this.getDataList();
this.activeTabList = ['product','process','attribute','partAttribute','file']
this.activeTab = 'product'
this.activeTab = 'attribute'
this.modalData.testNo = data.row
// this.modalFlag = false
this.$message.success("操作成功")
@ -2930,6 +2934,14 @@
strVal = this.modalData.engineerName
conSql = " and b.site = '" + this.$store.state.user.site + "'"
}
if (val === 2003) {
strVal = this.modalData.artworkName
conSql = " and b.site = '" + this.$store.state.user.site + "'"
}
if (val === 2004) {
strVal = this.modalData.plannerName
conSql = " and b.site = '" + this.$store.state.user.site + "'"
}
this.$refs.baseList.init(val, strVal, conSql)
})
},
@ -2975,6 +2987,14 @@
this.modalData.engineer = val.username
this.modalData.engineerName = val.user_display
}
if (this.tagNo === 2003){
this.modalData.artwork = val.username;
this.modalData.artworkName = val.user_display;
}
if (this.tagNo === 2004){
this.modalData.planner = val.username;
this.modalData.plannerName = val.user_display;
}
},
// ======== ========
@ -3017,7 +3037,11 @@
customerDesc: '',
projectId: '',
doesNeedArtwork:'',
artwork:'',
artworkName:'',
doesNeedPlanner:'',
planner: '',
plannerName: '',
projectName: '',
tracker: '',
trackerName: '',
@ -3052,9 +3076,10 @@
updateDate: '',
updateBy: ''
}
this.activeTab = 'partAttribute';
this.activeTabList = ['partAttribute']
this.activeTab = 'attribute';
this.activeTabList = ['attribute']
this.dialogProperties = [];
this.copyTestPropertiesList = [];
},
checkSelectable(row,index){
if (this.modalData.flag === '1' && this.activeTabList.length === 1){

154
src/views/modules/test/testAttribute/testProperties.vue

@ -26,6 +26,10 @@ export default {
type:Number,
default:300
},
showSaveButton:{
type:Boolean,
default:true
}
},
model:{
prop:"dataList",
@ -34,7 +38,7 @@ export default {
data(){
return{
loading:false,
attributeDialog:false,
attributeDialog:true,
copyAttributeList:[],
productColumnList: [
{
@ -131,25 +135,7 @@ export default {
columnProp: 'textValue',
headerAlign: "center",
align: "left",
columnLabel: '文本值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth:120,
},
{
userId: this.$store.state.user.name,
functionId: 100002001,
serialNumber: '100002001TableMinValue',
tableId: "100002001Table",
tableName: "属性表",
columnProp: 'numValue',
headerAlign: "center",
align: "right",
columnLabel: '数字值',
columnLabel: '实测值',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -158,6 +144,24 @@ export default {
fixed: '',
columnWidth:120,
},
// {
// userId: this.$store.state.user.name,
// functionId: 100002001,
// serialNumber: '100002001TableMinValue',
// tableId: "100002001Table",
// tableName: "",
// columnProp: 'numValue',
// headerAlign: "center",
// align: "right",
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth:120,
// },
{
userId: this.$store.state.user.name,
functionId: 100002001,
@ -179,9 +183,6 @@ export default {
}
},
methods:{
openTestProperties(){
this.copyAttributeList = JSON.parse(JSON.stringify(this.dataList))
},
getTestProperties(){
let params = {
site:this.$store.state.user.site,
@ -198,35 +199,32 @@ export default {
})
},
updateTestPropertiesList(){
this.loading = true
updateTestPropertiesList(this.copyAttributeList).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg);
this.getTestProperties();
this.attributeDialog = false;
this.attributeDialog = true;
}else {
this.$message.warning(data.msg);
}
this.loading = false
}).catch((error)=>{
this.$message.error(error)
this.loading = false
})
},
searchTestPropertiesList(){
let params = {
site:this.$store.state.user.site,
testNo: this.testNo
clickSave(){
if (!this.attributeDialog){
this.updateTestPropertiesList();
}else {
this.copyAttributeList = JSON.parse(JSON.stringify(this.dataList))
}
this.loading = true
searchTestPropertiesList(params).then(({data})=>{
if (data && data.code === 0){
this.getTestProperties();
}else {
this.$message.warning(data.msg)
}
this.loading = false
}).catch((error)=>{
this.loading = false
this.$message.error(error)
})
this.attributeDialog = false;
},
clickSaveBtn(){
//
}
},
}
@ -235,32 +233,38 @@ export default {
<template>
<div>
<div style="margin-top: 5px">
<el-button type="primary" :loading="loading" @click="searchTestPropertiesList">刷新属性</el-button>
<el-button type="primary" @click="attributeDialog = true">编辑</el-button>
<el-button type="primary" @click="clickSaveBtn">新增</el-button>
<el-button type="primary" :loading="loading" v-if="showSaveButton" @click="clickSave">{{ attributeDialog?'编辑':'保存' }}</el-button>
</div>
<el-table
:height="height"
:data="dataList"
border
style="width: 100%;margin-top: 5px">
<el-table-column
v-for="(item,index) in productColumnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed===''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<el-dialog title="测试单属性" :visible.sync="attributeDialog" @open="openTestProperties" append-to-body v-drag>
<div class="rq ">
<div class="rq " v-if="attributeDialog">
<el-table
:height="height"
:data="dataList"
border
style="width: 100%;margin-top: 5px">
<el-table-column
v-for="(item,index) in productColumnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed===''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
{{scope.row.textValue?scope.row.textValue:scope.row.numValue}}
</div>
</template>
</el-table-column>
</el-table>
</div>
<div class="rq " v-else>
<el-table
:height="height"
:data="copyAttributeList"
@ -283,19 +287,14 @@ export default {
</div>
<div v-else>
<div v-if="scope.row.valueChooseFlag !== 'Y'">
<div v-if="item.columnProp !== 'textValue'">
<el-input-number v-model="scope.row.numValue" style="margin-top: -6px;padding: 0;width: 100%" v-if="scope.row.valueType === '数字'" :controls="false"></el-input-number>
<el-input v-model="scope.row.numValue" :disabled="scope.row.valueType !== '数字'" v-else></el-input>
</div>
<div>
<el-input v-model="scope.row.textValue" :disabled="scope.row.valueType === '数字'" v-if="item.columnProp !== 'numValue'"></el-input>
</div>
<el-input-number v-model="scope.row.numValue" style="margin-top: -6px;padding: 0;width: 100%" v-if="scope.row.valueType === '数字'" :controls="false"></el-input-number>
<el-input v-model="scope.row.numValue" v-else></el-input>
</div>
<div v-else>
<el-select style="width: 100%;" :disabled="scope.row.valueType !== '文本'" v-if="item.columnProp === 'textValue'" v-model="scope.row.textValue">
<el-select style="width: 100%;" v-if="scope.row.valueType === '文本'" v-model="scope.row.textValue">
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.list" :key="key"></el-option>
</el-select>
<el-select style="width: 100%;" :disabled="scope.row.valueType === '文本'" v-else v-model="scope.row.numValue">
<el-select style="width: 100%;" v-else v-model="scope.row.numValue">
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.list" :key="key"></el-option>
</el-select>
</div>
@ -303,12 +302,7 @@ export default {
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:30px;text-align:center;margin-top: 8px">
<el-button type="primary" @click="updateTestPropertiesList">保存</el-button>
<el-button type="primary" @click="attributeDialog = false">关闭</el-button>
</el-footer>
</el-dialog>
</div>
</div>
</template>

Loading…
Cancel
Save