|
@@ -6,30 +6,32 @@
|
|
|
v-model="declareElementsModVis"
|
|
|
:confirmLoading="confirmLoading"
|
|
|
@cancel="handleCancel"
|
|
|
- width="86%"
|
|
|
+ width="60%"
|
|
|
+ keyboard="false"
|
|
|
+ destroyOnClose="true"
|
|
|
+ maskClosable="false"
|
|
|
style="top:330px;left:100px;"
|
|
|
>
|
|
|
- <!-- 主表信息 填写 -->
|
|
|
+ <!-- 主表信息 回显 -->
|
|
|
<a-card :bordered="false">
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-form-model layout="inline" ref="form" :model="declareElements">
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <!-- required必填项 disabled 禁用 -->
|
|
|
<a-form-model-item label="报关品名" prop="declarationName">
|
|
|
- <a-input placeholder="请输入报关品名" v-model="declareElements.declarationName"></a-input>
|
|
|
+ {{ declareElements.declarationName }}
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="HS code" prop="HScode">
|
|
|
- <a-input placeholder="请输入HS code" v-model="declareElements.HScode"></a-input>
|
|
|
+ <a-form-model-item label="HSCODE" prop="hsCode">
|
|
|
+ {{ declareElements.hsCode }}
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="英文品名" prop="customer">
|
|
|
- <a-input placeholder="请输入英文品名" v-model="declareElements.englishName"></a-input>
|
|
|
+ <a-form-model-item label="英文品名" prop="englishProductName">
|
|
|
+ {{ declareElements.englishProductName }}
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -37,10 +39,12 @@
|
|
|
</div>
|
|
|
</a-card>
|
|
|
|
|
|
- <!-- 子表 -->
|
|
|
+ <!-- 増行 子表 -->
|
|
|
<a-card :bordered="false" style="margin:10px 0">
|
|
|
- <!-- 増行 -->
|
|
|
- <a-button type="primary" @click="handleAddColumn" icon="plus" style="margin:10px 0;">増行</a-button>
|
|
|
+ <a-button type="primary" @click="handleAddColumn" icon="plus" style="margin:10px 0;">
|
|
|
+ 増行
|
|
|
+ </a-button>
|
|
|
+ <!-- 子表 -->
|
|
|
<a-spin :spinning="confirmLoading">
|
|
|
<a-form-model ref="formRef">
|
|
|
<a-table
|
|
@@ -52,10 +56,28 @@
|
|
|
:loading="loading"
|
|
|
:pagination="false"
|
|
|
>
|
|
|
+ <!-- 类型 下拉选择 -->
|
|
|
+ <template slot="typeValueSlot" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="typeValue">
|
|
|
+ <a-select v-model="record.typeValue" style="width:100%">
|
|
|
+ <a-select-option value="">请选择</a-select-option>
|
|
|
+ <a-select-option :value="0">品名</a-select-option>
|
|
|
+ <a-select-option :value="1">织造方法(针织或钩编)</a-select-option>
|
|
|
+ <a-select-option :value="2">种类(西服、便服套装、上衣、长裤、马裤、工装裤等)</a-select-option>
|
|
|
+ <a-select-option :value="3">类别(女式)</a-select-option>
|
|
|
+ <a-select-option :value="4">成分含量</a-select-option>
|
|
|
+ <a-select-option :value="5">品牌</a-select-option>
|
|
|
+ <a-select-option :value="6">货号</a-select-option>
|
|
|
+ <a-select-option :value="7">品牌类型</a-select-option>
|
|
|
+ <a-select-option :value="8">出口享惠情况</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
<!-- 描述 输入框-->
|
|
|
- <template slot="description" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="description">
|
|
|
- <a-input style="width:100%" type="text" v-model="record.description" />
|
|
|
+ <template slot="describeText" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="describeText">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.describeText" />
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
|
|
@@ -69,28 +91,29 @@
|
|
|
</a-form-model>
|
|
|
</a-spin>
|
|
|
</a-card>
|
|
|
+ </a-modal>
|
|
|
|
|
|
- <!-- 页面底部保存取消 -->
|
|
|
- <div
|
|
|
- :style="{
|
|
|
- position: 'absolute',
|
|
|
- right: 0,
|
|
|
- bottom: 0,
|
|
|
- width: '100%',
|
|
|
- borderTop: '1px solid #e9e9e9',
|
|
|
- padding: '10px 16px',
|
|
|
- background: '#fff',
|
|
|
- textAlign: 'right',
|
|
|
- zIndex: 1
|
|
|
- }"
|
|
|
- >
|
|
|
- <a-popconfirm title="确定放弃?" @confirm="handleCancel" okText="确定" cancelText="取消">
|
|
|
- <a-button :style="{ marginRight: '8px' }">返回</a-button>
|
|
|
- </a-popconfirm>
|
|
|
- <a-button type="primary" @click="addSave">
|
|
|
- 保存
|
|
|
- </a-button>
|
|
|
- </div>
|
|
|
+ <!-- 页面底部保存取消 -->
|
|
|
+ <div
|
|
|
+ :style="{
|
|
|
+ position: 'absolute',
|
|
|
+ right: 0,
|
|
|
+ bottom: 0,
|
|
|
+ width: '100%',
|
|
|
+ borderTop: '1px solid #e9e9e9',
|
|
|
+ padding: '10px 16px',
|
|
|
+ background: '#fff',
|
|
|
+ textAlign: 'right',
|
|
|
+ zIndex: 1
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <a-popconfirm title="确定放弃?" @confirm="handleCancel" okText="确定" cancelText="取消">
|
|
|
+ <a-button :style="{ marginRight: '8px' }">返回</a-button>
|
|
|
+ </a-popconfirm>
|
|
|
+ <a-button type="primary" @click="addSave">
|
|
|
+ 保存
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
</a-modal>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -106,29 +129,33 @@ export default {
|
|
|
components: { JEllipsis, moment },
|
|
|
|
|
|
data() {
|
|
|
- // let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
|
|
|
+ let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
|
|
|
|
|
|
return {
|
|
|
loading: false, // 表格加载
|
|
|
- // 表头
|
|
|
+ // 子表表头
|
|
|
declareElementsColumns: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
- width: 90,
|
|
|
+ width: 30,
|
|
|
dataIndex: 'index',
|
|
|
customRender: (text, record, index) => `${index + 1}`,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '类型',
|
|
|
- dataIndex: 'decEleContent',
|
|
|
- width: 90,
|
|
|
+ dataIndex: 'typeValue',
|
|
|
+ width: 80,
|
|
|
+ scopedSlots: { customRender: 'typeValueSlot' },
|
|
|
+ customRender: t => ellipsis(t),
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '描述',
|
|
|
- dataIndex: 'desc',
|
|
|
- width: 160,
|
|
|
+ dataIndex: 'describeText',
|
|
|
+ width: 80,
|
|
|
+ scopedSlots: { customRender: 'describeText' },
|
|
|
+ customRender: t => ellipsis(t),
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
|
|
@@ -136,14 +163,14 @@ export default {
|
|
|
title: '操作',
|
|
|
dataIndex: 'operation',
|
|
|
scopedSlots: { customRender: 'operationSlot' },
|
|
|
- width: 120,
|
|
|
+ width: 30,
|
|
|
className: 'replacecolor'
|
|
|
}
|
|
|
],
|
|
|
- declareElementsData: [{}, {}],
|
|
|
+ declareElements: {}, // 主表信息
|
|
|
+ declareElementsData: [], // 子表信息
|
|
|
confirmLoading: false,
|
|
|
- declareElementsModVis: false,
|
|
|
- declareElements: {} // 申报要素对象
|
|
|
+ declareElementsModVis: false
|
|
|
}
|
|
|
},
|
|
|
// 接收父组件 方法
|
|
@@ -156,8 +183,8 @@ export default {
|
|
|
console.log('増行')
|
|
|
const addrow = {
|
|
|
index: '',
|
|
|
- type: '',
|
|
|
- description: '',
|
|
|
+ typeValue: '',
|
|
|
+ describeText: '',
|
|
|
operation: ''
|
|
|
}
|
|
|
this.declareElementsData.push(addrow)
|
|
@@ -165,15 +192,20 @@ export default {
|
|
|
// 报关要素 保存
|
|
|
addSave() {
|
|
|
console.log('点击报关要素对话框 保存')
|
|
|
- // var newDeclareElement = {} // 新增对象
|
|
|
+ // var newChild = {} // 新增子表
|
|
|
// newDeclareElement.documentNo = this.addShipDet.documentNo // 单据号
|
|
|
- this.close()
|
|
|
- // 刷新
|
|
|
+ this.close()
|
|
|
+ // 刷新
|
|
|
+ },
|
|
|
+ handletypeValue(e) {
|
|
|
+ console.log('类型下拉菜单click', e)
|
|
|
},
|
|
|
-
|
|
|
close() {
|
|
|
this.$emit('close')
|
|
|
this.declareElementsModVis = false
|
|
|
+ this.declareElements = {}
|
|
|
+ // this.declareElementsData = []
|
|
|
+ console.log('清空')
|
|
|
},
|
|
|
handleCancel() {
|
|
|
this.close()
|