Browse Source

备品备件

java8
ruanqi 10 months ago
parent
commit
55ebe463fc
  1. 43
      src/views/modules/ecss/partHsCode.vue

43
src/views/modules/ecss/partHsCode.vue

@ -59,8 +59,11 @@
</el-form> </el-form>
<el-table <el-table
@row-click="changeData"
highlight-current-row
:height="height" :height="height"
:data="dataList" :data="dataList"
ref="mainTable"
border border
v-loading="dataListLoading" v-loading="dataListLoading"
style="width: 100%;"> style="width: 100%;">
@ -99,6 +102,14 @@
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper">
</el-pagination> </el-pagination>
<el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick" >
<el-tab-pane label="基本信息" name="attribute">
<order-attribute ref="dialogAttribute" :site="currentRow.site" :buNo="currentRow.buNo" :order-no="currentRow.partNo" :code-no="'BG001'" :function-type="'ECSS'"></order-attribute>
</el-tab-pane>
</el-tabs>
<el-dialog title="维护HSCode" :close-on-click-modal="false" v-drag :visible.sync="hsCodeModelFlag" width="500px"> <el-dialog title="维护HSCode" :close-on-click-modal="false" v-drag :visible.sync="hsCodeModelFlag" width="500px">
<el-form label-position="top" style="margin-left: 7px;margin-top: -5px;"> <el-form label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-row :gutter="20"> <el-row :gutter="20">
@ -140,12 +151,15 @@
}from "@/api/ecss/ecss.js" }from "@/api/ecss/ecss.js"
import {} from "@/api/sysLanguage.js" import {} from "@/api/sysLanguage.js"
import {getAllBuList}from '@/api/factory/site.js' import {getAllBuList}from '@/api/factory/site.js'
import orderAttribute from "./orderProperties"
export default { export default {
name: "null", name: "null",
components:{ components:{
orderAttribute,
}, },
data() { data() {
return { return {
activeName:'attribute',
// //
exportData: [], exportData: [],
exportName: '物料HsCode' + this.dayjs().format('YYYYMMDDHHmmss'), exportName: '物料HsCode' + this.dayjs().format('YYYYMMDDHHmmss'),
@ -526,11 +540,18 @@
hsCode:'', hsCode:'',
hsCodeDesc:'', hsCodeDesc:'',
}, },
currentRow:{
site:'',
partNo:'',
buNo:'',
recordType:'',
}
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.height = window.innerHeight - 240;
this.height = (window.innerHeight - 240)/2;
}) })
}, },
methods: { methods: {
@ -545,6 +566,10 @@
this.pageIndex = val this.pageIndex = val
this.searchTable() this.searchTable()
}, },
tabClick (tab, event) {
//
this.refreshCurrentTabTable()
},
searchTable(){ searchTable(){
this.searchData.limit = this.pageSize this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex this.searchData.page = this.pageIndex
@ -555,11 +580,23 @@
this.pageIndex = data.page.currPage this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
if(this.dataList.length>0){
this.$refs.mainTable.setCurrentRow(this.dataList[0]);
this.changeData(this.dataList[0])
}else {
this.changeData(null)
}
} else { } else {
this.dataList = []; this.dataList = [];
} }
}); });
}, },
refreshCurrentTabTable(){
if(this.currentRow===''||this.currentRow===null){
this.currentRow={site:'',partNo:'',buNo:'',recordType:''}
}
},
async createExportData () { async createExportData () {
this.searchData.limit = -1 this.searchData.limit = -1
this.searchData.page = 1 this.searchData.page = 1
@ -600,6 +637,10 @@
this.hsCodeModelData=JSON.parse(JSON.stringify(row)) this.hsCodeModelData=JSON.parse(JSON.stringify(row))
this.hsCodeModelFlag=true this.hsCodeModelFlag=true
}, },
changeData(row){
this.currentRow = JSON.parse(JSON.stringify(row));
this.refreshCurrentTabTable ();
},
saveHSCode(){ saveHSCode(){
if(this.hsCodeModelData.hsCode===''||this.hsCodeModelData.hsCode==null){ if(this.hsCodeModelData.hsCode===''||this.hsCodeModelData.hsCode==null){
this.$alert('请输入HSCODE!', '错误', { this.$alert('请输入HSCODE!', '错误', {

Loading…
Cancel
Save