|
@@ -124,13 +124,14 @@
|
|
<!-- 类型 下拉选择 -->
|
|
<!-- 类型 下拉选择 -->
|
|
<template slot="typeValueSlot" slot-scope="text, record, index">
|
|
<template slot="typeValueSlot" slot-scope="text, record, index">
|
|
<a-form-model-item prop="typeValue">
|
|
<a-form-model-item prop="typeValue">
|
|
- <a-select v-model="record.typeValue">
|
|
+ <a-select v-model="record.typeValue" @change="changeType(record,index)">
|
|
- <a-select-option
|
|
+ <a-select-option
|
|
- v-for="(item,index) in arrOption"
|
|
+ v-for="(item,index) in arrOption"
|
|
- :key="index"
|
|
+ :key="index"
|
|
- :value="item.value">
|
|
+ :value="item.value"
|
|
- {{item.label}}
|
|
+ >
|
|
- </a-select-option>
|
|
+ {{item.label}}
|
|
|
|
+ </a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
|
|
|
|
<!-- <j-dict-select-tag v-model="record.typeValue" placeholder="请选择类型" style="text-align:left;"
|
|
<!-- <j-dict-select-tag v-model="record.typeValue" placeholder="请选择类型" style="text-align:left;"
|
|
@@ -142,7 +143,7 @@
|
|
<!-- 描述 输入框-->
|
|
<!-- 描述 输入框-->
|
|
<template slot="describeText" slot-scope="text, record, index">
|
|
<template slot="describeText" slot-scope="text, record, index">
|
|
<a-form-model-item prop="describeText">
|
|
<a-form-model-item prop="describeText">
|
|
- <a-input style="width:100%" type="text" v-model="record.describeText" :disabled="pushState"/>
|
|
+ <a-input style="width:100%" type="text" v-model="record.describeText" :disabled="pushState||record.mandatoryAssign"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -288,11 +289,20 @@ export default {
|
|
index: '',
|
|
index: '',
|
|
typeValue: '',
|
|
typeValue: '',
|
|
describeText: '',
|
|
describeText: '',
|
|
- operation: ''
|
|
+ operation: '',
|
|
|
|
+ mandatoryAssign:false
|
|
}
|
|
}
|
|
this.declareElementsData.push(addrow)
|
|
this.declareElementsData.push(addrow)
|
|
},
|
|
},
|
|
-
|
|
+ changeType(record,index){
|
|
|
|
+ if(record.typeValue=='品名'){
|
|
|
|
+ record.describeText = this.declareElements.declarationName
|
|
|
|
+ record.mandatoryAssign = true
|
|
|
|
+ }else{
|
|
|
|
+ this.$set(record,'mandatoryAssign',false)
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//查询最近报关信息
|
|
//查询最近报关信息
|
|
queryLatelyDeclarationElements(){
|
|
queryLatelyDeclarationElements(){
|
|
var hscode = this.declareElements.declarationName;
|
|
var hscode = this.declareElements.declarationName;
|
|
@@ -302,6 +312,12 @@ export default {
|
|
res.result['itemIds'] = this.declareElements.itemIds;
|
|
res.result['itemIds'] = this.declareElements.itemIds;
|
|
this.declareElements=res.result;
|
|
this.declareElements=res.result;
|
|
this.declareElementsData=res.result.syDeclarationElementsItemList;
|
|
this.declareElementsData=res.result.syDeclarationElementsItemList;
|
|
|
|
+ this.declareElementsData.map(item=>{
|
|
|
|
+ if(item.typeValue=='品名'){
|
|
|
|
+ item.mandatoryAssign = true
|
|
|
|
+ item.describeText = this.declareElements.declarationName
|
|
|
|
+ }else{item.mandatoryAssign = false}
|
|
|
|
+ })
|
|
this.declareElements.inventoryName = inventoryName
|
|
this.declareElements.inventoryName = inventoryName
|
|
//console.info("赋值数据:"+JSON.stringify(this.declareElements))
|
|
//console.info("赋值数据:"+JSON.stringify(this.declareElements))
|
|
}else{
|
|
}else{
|
|
@@ -347,6 +363,9 @@ export default {
|
|
item.sort = index+1
|
|
item.sort = index+1
|
|
})
|
|
})
|
|
newObj.syDeclarationElementsItemList = this.declareElementsData
|
|
newObj.syDeclarationElementsItemList = this.declareElementsData
|
|
|
|
+ newObj.syDeclarationElementsItemList.map(event=>{
|
|
|
|
+ delete event.mandatoryAssign
|
|
|
|
+ })
|
|
// newDeclareElement.documentNo = this.addShipDet.documentNo // 单据号
|
|
// newDeclareElement.documentNo = this.addShipDet.documentNo // 单据号
|
|
syDeclarationElementsAdd(newObj).then(res => {
|
|
syDeclarationElementsAdd(newObj).then(res => {
|
|
if (res.success) {
|
|
if (res.success) {
|