|
|
@ -18,6 +18,9 @@ |
|
|
<el-form-item :label="'HS Code:'"> |
|
|
<el-form-item :label="'HS Code:'"> |
|
|
<el-input v-model="searchData.hsCode" style="width: 120px"></el-input> |
|
|
<el-input v-model="searchData.hsCode" style="width: 120px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'品牌:'"> |
|
|
|
|
|
<el-input v-model="searchData.brand" style="width: 120px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
<el-form-item :label="' '" > |
|
|
<el-form-item :label="' '" > |
|
|
<el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'查询'}}</el-button> |
|
|
<el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'查询'}}</el-button> |
|
|
<el-button @click="addModelOpen()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button> |
|
|
<el-button @click="addModelOpen()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button> |
|
|
@ -82,7 +85,7 @@ |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item :label="'BU:'"> |
|
|
<el-form-item :label="'BU:'"> |
|
|
<el-select v-model="addModel.buNo" placeholder="请选择" :disabled="addModel.addFlag!==0" style="width: 100%"> |
|
|
|
|
|
|
|
|
<el-select v-model="addModel.buNo" placeholder="请选择" :disabled="addModel.addFlag!==0" style="width: 100%" @change="changeAddBu"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for = "i in buList" |
|
|
v-for = "i in buList" |
|
|
:key = "i.buNo" |
|
|
:key = "i.buNo" |
|
|
@ -118,7 +121,12 @@ |
|
|
<el-input v-model="addModel.unit" ></el-input> |
|
|
<el-input v-model="addModel.unit" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="24"> |
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item :label="'品牌'" > |
|
|
|
|
|
<el-input v-model="addModel.brand" :disabled="addModel.addFlag!==0" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
<el-form-item :label="'备注'" > |
|
|
<el-form-item :label="'备注'" > |
|
|
<el-input v-model="addModel.remark" ></el-input> |
|
|
<el-input v-model="addModel.remark" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
@ -168,6 +176,7 @@ |
|
|
buNo:'', |
|
|
buNo:'', |
|
|
hsCode:'', |
|
|
hsCode:'', |
|
|
hsCodeDesc:'', |
|
|
hsCodeDesc:'', |
|
|
|
|
|
brand:'', |
|
|
codeNo:'', |
|
|
codeNo:'', |
|
|
username:this.$store.state.user.name, |
|
|
username:this.$store.state.user.name, |
|
|
}, |
|
|
}, |
|
|
@ -185,6 +194,7 @@ |
|
|
codeNo:'', |
|
|
codeNo:'', |
|
|
unit:'', |
|
|
unit:'', |
|
|
remark:'', |
|
|
remark:'', |
|
|
|
|
|
brand:'无' |
|
|
}, |
|
|
}, |
|
|
addDisabledFlag:true, |
|
|
addDisabledFlag:true, |
|
|
activeName:'attribute', |
|
|
activeName:'attribute', |
|
|
@ -297,6 +307,24 @@ |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
columnWidth: 100 |
|
|
columnWidth: 100 |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
|
|
functionId: 801003, |
|
|
|
|
|
serialNumber: '801003Table1Brand', |
|
|
|
|
|
tableId: "801003Table1", |
|
|
|
|
|
tableName: "HsCode基础信息", |
|
|
|
|
|
columnProp: "brand", |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: "品牌", |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 100 |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 801003, |
|
|
functionId: 801003, |
|
|
@ -454,7 +482,7 @@ |
|
|
}, |
|
|
}, |
|
|
refreshCurrentTabTable(){ |
|
|
refreshCurrentTabTable(){ |
|
|
if(this.currentRow===''||this.currentRow===null){ |
|
|
if(this.currentRow===''||this.currentRow===null){ |
|
|
this.currentRow={site:'',hsCode:'',hsCodeDesc: '',buNo:'',recordType:'',codeNo:''} |
|
|
|
|
|
|
|
|
this.currentRow={site:'',hsCode:'',hsCodeDesc: '',buNo:'',recordType:'',codeNo:'',brand:''} |
|
|
} |
|
|
} |
|
|
if(this.activeName==='detail'){ |
|
|
if(this.activeName==='detail'){ |
|
|
// searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => { |
|
|
// searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => { |
|
|
@ -491,13 +519,36 @@ |
|
|
buNo:'', |
|
|
buNo:'', |
|
|
hsCode:'', |
|
|
hsCode:'', |
|
|
hsCodeDesc: '', |
|
|
hsCodeDesc: '', |
|
|
|
|
|
hsCodeDescEn:'', |
|
|
codeNo:'', |
|
|
codeNo:'', |
|
|
unit:'', |
|
|
unit:'', |
|
|
remark:'', |
|
|
remark:'', |
|
|
brand:'无' |
|
|
|
|
|
|
|
|
brand:'' |
|
|
} |
|
|
} |
|
|
this.addModelFlag=true |
|
|
this.addModelFlag=true |
|
|
}, |
|
|
}, |
|
|
|
|
|
getBuMatchText(buNo) { |
|
|
|
|
|
let currentBuNo = buNo || '' |
|
|
|
|
|
let buItem = this.buList.find(item => item.buNo === currentBuNo) |
|
|
|
|
|
let buDesc = buItem && buItem.buDesc ? buItem.buDesc : '' |
|
|
|
|
|
return (currentBuNo + ' ' + buDesc).toLowerCase() |
|
|
|
|
|
}, |
|
|
|
|
|
isSoftRfidBu(buNo) { |
|
|
|
|
|
let matchText = this.getBuMatchText(buNo) |
|
|
|
|
|
return matchText.indexOf('软标') !== -1 || matchText.indexOf('rfid') !== -1 |
|
|
|
|
|
}, |
|
|
|
|
|
isCodeNoOptionalBu(buNo) { |
|
|
|
|
|
let matchText = this.getBuMatchText(buNo) |
|
|
|
|
|
return matchText.indexOf('硬标') !== -1 || matchText.indexOf('alpha') !== -1 || matchText.indexOf('天线') !== -1 |
|
|
|
|
|
}, |
|
|
|
|
|
changeAddBu(val) { |
|
|
|
|
|
if (this.addModel.addFlag !== 0) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (this.isSoftRfidBu(val) && (!this.addModel.brand || this.addModel.brand.trim() === '')) { |
|
|
|
|
|
this.addModel.brand = '无' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
updateModelOpen(row){ |
|
|
updateModelOpen(row){ |
|
|
this.addDisabledFlag=false |
|
|
this.addDisabledFlag=false |
|
|
this.addModel={ |
|
|
this.addModel={ |
|
|
@ -516,7 +567,14 @@ |
|
|
}, |
|
|
}, |
|
|
deleteHsCode(row){ |
|
|
deleteHsCode(row){ |
|
|
this.$confirm('确认删除?', '提示').then(() => { |
|
|
this.$confirm('确认删除?', '提示').then(() => { |
|
|
deleteHsCode(row).then(({data}) => { |
|
|
|
|
|
|
|
|
let deleteData = { |
|
|
|
|
|
site: row.site, |
|
|
|
|
|
buNo: row.buNo, |
|
|
|
|
|
hsCodeDesc: row.hsCodeDesc, |
|
|
|
|
|
brand: row.brand || '无', |
|
|
|
|
|
codeNo: row.codeNo |
|
|
|
|
|
} |
|
|
|
|
|
deleteHsCode(deleteData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.searchTable() |
|
|
this.searchTable() |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
@ -552,7 +610,13 @@ |
|
|
}) |
|
|
}) |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if(this.addModel.codeNo==null||this.addModel.codeNo===''){ |
|
|
|
|
|
|
|
|
if(this.addModel.brand==null||this.addModel.brand===''){ |
|
|
|
|
|
this.$alert('请输入品牌!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
if(!this.isCodeNoOptionalBu(this.addModel.buNo) && (this.addModel.codeNo==null||this.addModel.codeNo==='')){ |
|
|
this.$alert('请选择属性模板!', '错误', { |
|
|
this.$alert('请选择属性模板!', '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
}) |
|
|
}) |
|
|
|