Browse Source

2025/7/14

master
Aoi_Tori 6 months ago
parent
commit
19b0a9dc07
  1. 16
      src/views/modules/oss/ossComponents.vue
  2. 157
      src/views/modules/tooling/searchToolApply.vue

16
src/views/modules/oss/ossComponents.vue

@ -51,6 +51,10 @@ export default {
removeVisible:{
type:Boolean,
default:true
},
visibleFlag: {
type: Boolean,
default: true
}
},
data(){
@ -60,12 +64,12 @@ export default {
uploadLoading:false,
selectionDataList:[],
ossVisible:false,
visibleFlag: true,
ossForm:{
orderRef2:'',
orderRef3:'',
remark:''
},
operatorFlag: true,
fileList:[],
}
},
@ -246,6 +250,9 @@ export default {
orderRef3:this.orderRef3,
}
}
},
effectiveVisibleFlag() {
return this.visibleFlag !== undefined && this.visibleFlag !== null ? this.visibleFlag : true;
}
},
watch:{
@ -266,14 +273,15 @@ export default {
},
mounted() {
this.ossForm.orderRef2 = this.orderRef2;
console.log(this)
}
}
</script>
<template>
<div>
<template v-if="saveVisible">
<el-button type="primary" v-if="this.orderRef1 && this.orderRef2 && !disabled && operatorFlag" @click="handleUpload">上传附件</el-button>
<template v-if="saveVisible&&effectiveVisibleFlag">
<el-button type="primary" v-if="this.orderRef1 && this.orderRef2 && !disabled" @click="handleUpload">上传附件</el-button>
</template>
<template v-if="downloadVisible">
<el-button type="primary" @click="handleDownload">下载</el-button>
@ -309,7 +317,7 @@ export default {
width="120"
label="操作" v-if="removeVisible || previewVisible">
<template slot-scope="{row,$index}">
<template v-if="removeVisible&&operatorFlag">
<template v-if="removeVisible&&effectiveVisibleFlag">
<el-link style="cursor:pointer;" v-if="!disabled" @click="handleRemove(row)">删除</el-link>
</template>
<template v-if="previewVisible">

157
src/views/modules/tooling/searchToolApply.vue

@ -226,7 +226,7 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="附件信息" name="down">
<oss-components height="25vh" ref="oss" :operatorFlag="operatorFlag" :dataList="fileList" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
<oss-components height="25vh" ref="oss" :visibleFlag="dataForm.status === '草稿' || (dataForm.status === '审批中' && operatorFlag)" :dataList="fileList" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
</el-tab-pane>
<!-- 审批信息 -->
<el-tab-pane label="审批信息" name="approvalInformation">
@ -390,11 +390,10 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="附件信息" name="down">
<oss-components height="25vh" :operatorFlag="operatorFlag" :dataList="fileList" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
<oss-components height="25vh" :visibleFlag="dataForm.status === '草稿' || (dataForm.status === '审批中' && operatorFlag)" :dataList="fileList" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
</el-tab-pane>
</el-tabs>
<el-footer style="height:35px;margin-top:15px;text-align:center">
<el-button type="primary" @click="apply()" class="bigButton">{{ '应用' }}</el-button>
<el-button type="primary" @click="saveData()" class="bigButton">{{ '保存' }}</el-button>
<el-button type="primary" @click="visibleU = false" class="bigButton">{{ '取消' }}</el-button>
</el-footer>
@ -550,7 +549,7 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="附件信息" name="down">
<oss-components height="25vh" :dataList="fileList" :operatorFlag="operatorFlag" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
<oss-components height="25vh" :dataList="fileList" :visibleFlag="dataForm.status === '草稿' || (dataForm.status === '审批中' && operatorFlag)" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
</el-tab-pane>
</el-tabs>
<el-footer style="height:35px;margin-top:15px;text-align:center">
@ -632,37 +631,73 @@
</el-footer>
</el-dialog>
<el-dialog title="新增工具明细" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="toolDetailFlag">
<el-form :inline="true" label-position="top" :model="toolDetailData" :rules="toolDetailRules">
<el-form-item label="项目号">
<el-input v-model="toolDetailData.orderRef1" style=""></el-input>
</el-form-item>
<el-form-item label="项目名称">
<el-input v-model="toolDetailData.projectName"></el-input>
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="toolDetailData.customerName"></el-input>
</el-form-item>
<el-form-item label="PLM物料编码">
<el-input v-model="toolDetailData.plmPartNo"></el-input>
</el-form-item>
<el-form-item label="IFS物料编码">
<el-input v-model="toolDetailData.ifsPartNo"></el-input>
</el-form-item>
<el-form-item label="物料名称">
<el-input v-model="toolDetailData.partDesc"></el-input>
</el-form-item>
<el-form-item label="客户料号">
<el-input v-model="toolDetailData.customerPartNo"></el-input>
</el-form-item>
<el-form-item label="工具编码">
<el-input v-model="toolDetailData.toolId"></el-input>
</el-form-item>
<el-form-item label="工具描述">
<el-input v-model="toolDetailData.toolDesc"></el-input>
</el-form-item>
</el-form>
</el-dialog>
<!-- <el-dialog title="新增工具明细" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="toolDetailFlag">-->
<!-- <div class="rq">-->
<!-- <el-form :inline="true" label-position="top" :model="toolDetailData">-->
<!-- <el-form-item :label="'BU'">-->
<!-- <el-select v-model="toolDetailData.buNo" disabled style="width: 70px">-->
<!-- <el-option-->
<!-- v-for = "i in buList"-->
<!-- :key = "i.buNo"-->
<!-- :label = "i.buNo"-->
<!-- :value = "i.buNo">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="技术参数卡编码">-->
<!-- <el-input v-model="searchData2.codeNo" clearable style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="PLM物料编码">-->
<!-- <el-input v-model="searchData2.testPartNo" clearable style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="IFS物料编码">-->
<!-- <el-input v-model="searchData2.partNo" clearable style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="客户编码">-->
<!-- <el-input v-model="searchData2.customerId" clearable style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="项目号">-->
<!-- <el-input v-model="searchData2.projectId" clearable style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="' '">-->
<!-- <el-button type="primary" @click="addChangeDetail()">查询</el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <el-table-->
<!-- :height="300"-->
<!-- :data="dataList2"-->
<!-- @selection-change="selectionData2"-->
<!-- border-->
<!-- style="width: 100%;">-->
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="50">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- v-for="(item,index) in columnList2" :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>-->
<!-- </div>-->
<!-- <el-footer style="height:40px;margin-top: 20px;text-align:center">-->
<!-- <el-button type="primary" @click="">应用</el-button>-->
<!-- <el-button type="primary" @click="addDetail">确认</el-button>-->
<!-- <el-button type="primary" @click="addDetailModal = false">关闭</el-button>-->
<!-- </el-footer>-->
<!-- </el-dialog>-->
<!-- 上传文件的modal -->
<projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
@ -813,6 +848,9 @@ export default {
supplierName: '',
allCost: '',
remark2: '',
},
toolDetailSearchData:{
},
toolDetailData:{
@ -1791,6 +1829,11 @@ export default {
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
if(this.dataForm.sp===null){
this.dataForm.sp = ''
}
this.operatorFlag = this.superAdmin || (this.dataForm.sp!=='' && this.dataForm.sp.split(';').includes(this.sp))
if (this.dataList1.length > 0) {
this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
this.currentRow = JSON.parse(JSON.stringify(this.dataList1[0]));
@ -1806,7 +1849,11 @@ export default {
},
//
changeData(row) {
this.operatorFlag = this.superAdmin || (this.dataForm.sp && this.dataForm.sp.split(';').includes(sp))
this.dataForm.status = row.status
if(this.dataForm.sp===null){
this.dataForm.sp = ''
}
this.operatorFlag = this.superAdmin || (this.dataForm.sp!=='' && this.dataForm.sp.split(';').includes(this.sp))
this.currentRow = JSON.parse(JSON.stringify(row));
this.currentRow2 = row;
this.refreshCurrentTabTable();
@ -2409,40 +2456,6 @@ export default {
})
},
apply(){
this.dataForm.detailList = this.toolData
editToolApplication(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
this.saveHeaderMessage2()
for (let i = 0; i < this.dataList1.length; i++) {
if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
this.dataList1[i].remark = this.dataForm.remark
this.dataList1[i].applySumQty = this.dataForm.applySumQty
this.dataList1[i].applyReason = this.dataForm.applyReason
this.dataList1[i].quoter = this.dataForm.quoter
this.dataList1[i].tp = this.dataForm.tp
this.dataList1[i].totalCost = this.dataForm.totalCost
this.dataList1[i].purchaser = this.dataForm.purchaser
this.dataList1[i].quoterName = this.dataForm.quoterName
this.dataList1[i].tpName = this.dataForm.tpName
this.dataList1[i].purchaserName = this.dataForm.purchaserName
}
}
this.refreshCurrentTabTable()
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {
// }
// })
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
},
activated() {
@ -2489,6 +2502,10 @@ export default {
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
if(this.dataForm.sp===null){
this.dataForm.sp = ''
}
this.operatorFlag = this.superAdmin || (this.dataForm.sp!=='' && this.dataForm.sp.split(';').includes(this.sp))
if (this.dataList1.length > 0) {
this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
this.currentRow = JSON.parse(JSON.stringify(this.dataList1[0]));

Loading…
Cancel
Save