Browse Source

2025-05-26

技术参数卡copy优化
masterPart inventoryPart 按钮权限
master
fengyuan_yang 8 months ago
parent
commit
c73e12bcc9
  1. 8
      src/views/modules/part/partCatalogInformation.vue
  2. 20
      src/views/modules/part/partInformation.vue
  3. 215
      src/views/modules/sampleManagement/technicalSpecificationList.vue

8
src/views/modules/part/partCatalogInformation.vue

@ -10,7 +10,7 @@
</el-form-item>
<el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
<el-button v-if="isAuth('104001002:save')" type="primary" @click="addModal()">新增</el-button>
<!-- <el-button type="primary" @click="delModal()">删除</el-button>-->
<download-excel
:fields="fields()"
@ -68,7 +68,7 @@
width="100"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
<el-link v-if="isAuth('104001002:update')" style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
</template>
</el-table-column>
</el-table>
@ -178,9 +178,9 @@
<!-- 物料属性页签 -->
<el-tab-pane label="物料属性" name="part_item">
<el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
<el-button type="primary" @click="addOrDelItem">新增</el-button>
<el-button v-if="isAuth('104001002:itemSave')" type="primary" @click="addOrDelItem">新增</el-button>
<!-- <el-button type="primary" @click="updateItemValue">编辑</el-button>-->
<el-button type="primary" :loading="loading" @click="clickSave">{{ attributeDialog?'编辑':'保存' }}</el-button>
<el-button v-if="isAuth('104001002:itemUpdate')" type="primary" :loading="loading" @click="clickSave">{{ attributeDialog?'编辑':'保存' }}</el-button>
</el-form>
<div class="rq" v-if="attributeDialog">
<el-table

20
src/views/modules/part/partInformation.vue

@ -56,8 +56,8 @@
</el-form-item>
<el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
<el-button type="primary" @click="delModal()">删除</el-button>
<el-button v-if="isAuth('104001001:save')" type="primary" @click="addModal()">新增</el-button>
<el-button v-if="isAuth('104001001:delete')" type="primary" @click="delModal()">删除</el-button>
<download-excel
:fields="fields()"
:data="exportData"
@ -115,7 +115,7 @@
width="100"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
<el-link v-if="isAuth('104001001:update')" style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
<el-dropdown trigger="click">
<el-link style="cursor: pointer;font-size: 12px">
更多
@ -678,7 +678,7 @@
<!-- 代理商页签 -->
<el-tab-pane label="代理商" name="part_agent">
<el-form label-position="top" style="margin-left: 2px;">
<el-button type="primary" @click="savePartAgent">新增</el-button>
<el-button v-if="isAuth('104001001:agentSave')" type="primary" @click="savePartAgent">新增</el-button>
</el-form>
<el-table
:data="partAgentList"
@ -707,7 +707,7 @@
fixed="right"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="deleteAgent2(scope.row)">删除</el-link>
<el-link v-if="isAuth('104001001:agentDelete')" style="cursor: pointer" @click="deleteAgent2(scope.row)">删除</el-link>
</template>
</el-table-column>
</el-table>
@ -715,7 +715,7 @@
<!-- 制造商页签 -->
<el-tab-pane label="制造商" name="part_manufacturer">
<el-form label-position="top" style="margin-left: 2px;">
<el-button type="primary" @click="savePartManufacturer()">新增</el-button>
<el-button v-if="isAuth('104001001:manufacturerSave')" type="primary" @click="savePartManufacturer()">新增</el-button>
</el-form>
<el-table
:data="partManufacturerList"
@ -744,7 +744,7 @@
fixed="right"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="deleteManufacturer2(scope.row)">删除</el-link>
<el-link v-if="isAuth('104001001:manufacturerDelete')" style="cursor: pointer" @click="deleteManufacturer2(scope.row)">删除</el-link>
</template>
</el-table-column>
</el-table>
@ -752,7 +752,7 @@
<!-- 默认库位页签 -->
<el-tab-pane label="默认库位" name="default_locations">
<el-form label-position="top" style="margin-left: 2px;">
<el-button type="primary" @click="saveDefaultLocation()">新增</el-button>
<el-button v-if="isAuth('104001001:locationSave')" type="primary" @click="saveDefaultLocation()">新增</el-button>
</el-form>
<el-table
:data="defaultLocationList"
@ -781,14 +781,14 @@
fixed="right"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="deleteLocation2(scope.row)">删除</el-link>
<el-link v-if="isAuth('104001001:locationDelete')" style="cursor: pointer" @click="deleteLocation2(scope.row)">删除</el-link>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<!-- 文档页签 -->
<el-tab-pane label="附件信息" name="part_file">
<oss-components label="物料编码" :height="secondHeight - 73" :columns="columnFileList" :order-ref2="partCurrentRow.partNo" :order-ref1="partCurrentRow.site"></oss-components>
<oss-components label="物料编码" :height="secondHeight - 73" :columns="columnFileList" :order-ref2="partCurrentRow.partNo" :order-ref1="partCurrentRow.site" :disabled="!isAuth('104001001:fileSaveAndDelete')"></oss-components>
</el-tab-pane>
</el-tabs>

215
src/views/modules/sampleManagement/technicalSpecificationList.vue

@ -55,6 +55,7 @@
<!-- <el-button @click="test()" type="primary" style="margin-left: 2px;margin-top:0px">测试</el-button>-->
</el-form-item>
</el-form>
<el-table
:data="dataList1"
:height="height"
@ -106,6 +107,7 @@
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
@ -115,6 +117,7 @@
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="refreshCurrentTabTable">
<el-tab-pane label="基本信息" name="info">
<el-form label-position="top" label-width="100px" >
@ -357,12 +360,10 @@
<approval-information ref="approvalTable" v-model:data-list="approvalList" :height="240"></approval-information>
</el-tab-pane>
</el-tabs>
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="search" v-drag></add-or-update>
<el-dialog width="500px"
:title="'升版'"
:close-on-click-modal="false"
:visible.sync="revNoFlag">
<el-dialog width="500px" :title="'升版'" :close-on-click-modal="false" :visible.sync="revNoFlag">
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'参数卡编码'">
<el-input v-model="revNoData.oriCodeNo" style="width: 130px" disabled></el-input>
@ -384,28 +385,30 @@
<el-button type="primary" @click="revNoFlag = false">{{'关闭'}}</el-button>
</el-form>
</el-dialog>
<el-dialog
width="750px"
title="选择物料"
:close-on-click-modal="false"
:visible.sync="partModelFlag">
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item style="margin-left: 0px" label="技术参数卡">
<el-input v-model="copyData.oriCodeNo" style="width: 130px" disabled ></el-input>
<el-dialog width="750px" title="选择物料" :close-on-click-modal="false" :visible.sync="partModelFlag">
<el-form :inline="true" label-position="top" label-width="100px">
<el-form-item label="正式料号">
<el-input v-model="copyData.finalPartNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="项目料号">
<el-input v-model="copyData.testPartNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="项目号">
<el-input v-model="copyData.projectId" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item style="margin-left: 0px" label="版本">
<el-input v-model="copyData.revNo" style="width: 130px" disabled ></el-input>
<el-form-item label="客户料号">
<el-input v-model="copyData.customerPartNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item style="margin-left: 0px" label="项目料号">
<el-input v-model="copyData.testPartNo" style="width: 130px" disabled ></el-input>
<el-form-item label="BU">
<bu-select v-model="copyData.buNo" style="width: 80px"></bu-select>
</el-form-item>
<el-form-item style="margin-left: 0px" label="项目号">
<el-input v-model="copyData.projectId" style="width: 130px" disabled ></el-input>
<el-form-item :label="' '">
<el-button type="primary" @click="searchCopyPart()">查询</el-button>
</el-form-item>
</el-form>
<el-table
height="450"
height="250"
:data="partList"
border
@row-dblclick="choosePartNo"
@ -456,7 +459,21 @@
label="BU">
</el-table-column>
</el-table>
<!-- 分页插件 -->
<el-pagination
@size-change="sizeChangeHandle2"
@current-change="currentChangeHandle2"
:current-page="pageIndex2"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize2"
:total="totalPage2"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="partModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
@ -495,22 +512,25 @@
},
data() {
return {
approvalList:[],
activeName:'info',
addOrUpdateVisible:false,
height:200,
approvalList: [],
activeName: 'info',
addOrUpdateVisible: false,
height: 200,
dataList1: [],
partList:[],
copyData:{
site:'',
codeNo:'',
oriCodeNo:'',
testPartNo:'',
projectId:'',
revNo:'',
newPartNo:'',
partList: [],
copyData: {
site: '',
buNo: '',
codeNo: '',
oriCodeNo: '',
testPartNo: '',
projectId: '',
revNo: '',
newPartNo: '',
page: 1,
limit: 20
},
partModelFlag:false,
partModelFlag: false,
searchData: {
page: 1,
limit: 20,
@ -519,14 +539,17 @@
testPartNo: '',
oriCodeNo: '',
statusDesc: '',
codeNo:'',
codeNo: '',
ecnFlag: '',
buNo:'',
customerDesc:'',
buNo: '',
customerDesc: '',
},
pageIndex: 1,
pageSize: 20,
totalPage: 0,
pageIndex2: 1,
pageSize2: 20,
totalPage2: 0,
dataListLoading: false,
currentRow:'',
exportList:[],
@ -1033,12 +1056,27 @@
this.pageIndex = 1
this.search()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.search()
},
search(){
//
sizeChangeHandle2 (val) {
this.pageSize2 = val
this.pageIndex2 = 1
this.searchCopyPart()
},
//
currentChangeHandle2 (val) {
this.pageIndex2 = val
this.searchCopyPart()
},
search () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
this.dataListLoading = true;
@ -1055,15 +1093,17 @@
}
this.dataListLoading = false
}).catch((error)=>{
this.$message.error(error);
this.dataListLoading = false;
this.$message.error(error)
this.dataListLoading = false
})
},
changeData(row) {
this.currentRow = JSON.parse(JSON.stringify(row));
this.infoData=row;
this.refreshCurrentTabTable ();
changeData (row) {
this.currentRow = JSON.parse(JSON.stringify(row))
this.infoData = row
this.refreshCurrentTabTable()
},
// S
getBaseList (val, type) {
this.tagNo = val
@ -1088,6 +1128,7 @@
this.$refs.baseList.init(val, strVal)
})
},
refreshCurrentTabTable () {
if (this.activeName == 'customerInfo') {
this.getTechnicalCustomerInfoData();
@ -1096,19 +1137,21 @@
this.getApprovalList()
}
},
getTechnicalCustomerInfoData(){
let inData={
id:this.currentRow.id
getTechnicalCustomerInfoData () {
let inData = {
id: this.currentRow.id
}
getTechnicalCustomerInfoData(inData).then(({data}) => {
//
if (data && data.code == 0) {
this.customerData = data.row;
this.customerData = data.row
} else {
this.customerData = [];
this.customerData = []
}
});
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 1013) {
@ -1245,49 +1288,73 @@
})
}
},
copyBM(row){
this.copyData={
site:row.site,
codeNo:row.codeNo,
oriCodeNo:row.oriCodeNo,
testPartNo:row.testPartNo,
projectId:row.projectId,
revNo:row.revNo,
newPartNo:'',
copyBM (row) {
this.copyData = {
site: row.site,
buNo: '',
codeNo: row.codeNo,
oriCodeNo: row.oriCodeNo,
testPartNo: row.testPartNo,
projectId: row.projectId,
revNo: row.revNo,
newPartNo: '',
limit: this.pageSize2,
page: this.pageIndex2
}
searchCopyPart(this.copyData).then(({data}) => {
if (data.code == 0) {
this.partList=data.rows
if (data.code === 0) {
this.partList = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
}
this.dataListLoading = false
})
this.partModelFlag=true
this.partModelFlag = true
},
choosePartNo(row){
let saveData={
site:this.copyData.site,
codeNo:this.copyData.codeNo,
testPartNo:this.copyData.testPartNo,
projectId:this.copyData.projectId,
revNo:this.copyData.revNo,
newPartNo:row.testPartNo,
username:this.$store.state.user.name
// copy part
searchCopyPart () {
this.copyData.limit = this.pageSize2
this.copyData.page = this.pageIndex2
searchCopyPart(this.copyData).then(({data}) => {
if (data.code === 0) {
this.partList = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
} else {
this.partList = []
}
})
},
//
choosePartNo (row) {
let tempData = {
site: this.copyData.site,
codeNo: this.copyData.codeNo,
testPartNo: this.copyData.testPartNo,
projectId: this.copyData.projectId,
revNo: this.copyData.revNo,
newPartNo: row.testPartNo,
username: this.$store.state.user.name
}
this.$confirm('确定要拷贝?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
copyBm(saveData).then(({data}) => {
copyBm(tempData).then(({data}) => {
if (data && data.code === 0) {
this.$message.success( '操作成功')
this.partModelFlag=false;
this.search();
this.partModelFlag = false
this.search()
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {
})
},

Loading…
Cancel
Save