Browse Source

修改

master
han\hanst 6 days ago
parent
commit
bb09ab58bf
  1. 31
      src/views/modules/ecss/declaration.vue
  2. 76
      src/views/modules/ecss/hsCode.vue

31
src/views/modules/ecss/declaration.vue

@ -492,7 +492,12 @@
<el-checkbox v-model="exportInvoice.hsCodeFlag">Hs Code</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="20" style="">
<el-col :span="4" >
<el-form-item :label="' '" >
<el-checkbox v-model="exportInvoice.contractFlag">合同</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="16" style="">
<el-form-item :label="'发票备注'" >
<el-input type="textarea" :rows="2" v-model="exportInvoice.fpremark"></el-input>
</el-form-item>
@ -519,10 +524,10 @@
</el-col>
<el-col :span="8">
<el-form-item :label="'Shipping Mark'" >
<el-input v-model="exportPaking.shippingMark"></el-input>
<el-input type="textarea" :rows="2" v-model="exportPaking.shippingMark"></el-input>
</el-form-item>
</el-col>
<el-col :span="24" style="">
<el-col :span="24" style="margin-top: 5px;">
<el-form-item :label="'箱单备注'" >
<el-input type="textarea" :rows="2" v-model="exportPaking.xdremark"></el-input>
</el-form-item>
@ -2339,7 +2344,7 @@
this.exportPaking.itemNo=this.currentRow.itemNo
this.exportPaking.upc=this.currentRow.upc
this.exportPaking.so=this.currentRow.so
this.exportPaking.shippingMark=this.currentRow.cmcInvoice
this.exportPaking.shippingMark=this.buildDefaultShippingMark()
this.exportPaking.palletWeight=this.currentRow.palletWeight
this.exportPaking.hsCodeDesc=this.currentRow.hsCodeDesc
this.exportPaking.contractFlag=this.currentRow.contractFlag
@ -2421,6 +2426,20 @@
return ''
},
buildDefaultShippingMark() {
if (!this.currentRow || !this.currentRow.buNo) {
return ''
}
const cmcInvoice = this.currentRow.cmcInvoice ? String(this.currentRow.cmcInvoice).trim() : ''
const destination = this.currentRow.destination ? String(this.currentRow.destination).trim() : ''
if (this.currentRow.buNo === '01-Label' || this.currentRow.buNo === '03-RFID') {
return cmcInvoice
} else {
return ['Checkpoint '+destination, cmcInvoice].filter(Boolean).join('\n')
}
return ''
},
//
downloadDeclarationElements() {
if (!this.currentRow || !this.currentRow.buNo) {
@ -2681,7 +2700,7 @@
this.exportPaking.itemNo=this.currentRow.itemNo
this.exportPaking.upc=this.currentRow.upc
this.exportPaking.so=this.currentRow.so
this.exportPaking.shippingMark=this.exportHeader.contractNo
this.exportPaking.shippingMark=this.buildDefaultShippingMark()
this.exportPaking.palletWeight=this.currentRow.palletWeight
this.exportPaking.hsCodeDesc=this.currentRow.hsCodeDesc
this.exportPaking.contractFlag=this.currentRow.contractFlag
@ -2778,7 +2797,7 @@
} else if (this.currentRow.buNo==='02-Hardtag'){
this.exportPaking.kgs=5.4
}
this.exportPaking.shippingMark=this.exportHeader.contractNo
this.exportPaking.shippingMark=this.buildDefaultShippingMark()
if (this.currentRow.buNo==='03-RFID' || this.currentRow.buNo==='01-Label') {
this.exportAllFlag = true
} else {

76
src/views/modules/ecss/hsCode.vue

@ -18,6 +18,9 @@
<el-form-item :label="'HS Code:'">
<el-input v-model="searchData.hsCode" style="width: 120px"></el-input>
</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-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>
@ -82,7 +85,7 @@
<el-row :gutter="20">
<el-col :span="12">
<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
v-for = "i in buList"
:key = "i.buNo"
@ -118,7 +121,12 @@
<el-input v-model="addModel.unit" ></el-input>
</el-form-item>
</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-input v-model="addModel.remark" ></el-input>
</el-form-item>
@ -168,6 +176,7 @@
buNo:'',
hsCode:'',
hsCodeDesc:'',
brand:'',
codeNo:'',
username:this.$store.state.user.name,
},
@ -185,6 +194,7 @@
codeNo:'',
unit:'',
remark:'',
brand:'无'
},
addDisabledFlag:true,
activeName:'attribute',
@ -297,6 +307,24 @@
fixed: '',
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,
functionId: 801003,
@ -454,7 +482,7 @@
},
refreshCurrentTabTable(){
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'){
// searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => {
@ -491,13 +519,36 @@
buNo:'',
hsCode:'',
hsCodeDesc: '',
hsCodeDescEn:'',
codeNo:'',
unit:'',
remark:'',
brand:''
brand:''
}
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){
this.addDisabledFlag=false
this.addModel={
@ -516,7 +567,14 @@
},
deleteHsCode(row){
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) {
this.searchTable()
this.$message({
@ -552,7 +610,13 @@
})
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('请选择属性模板!', '错误', {
confirmButtonText: '确定'
})

Loading…
Cancel
Save