正在显示
19 个修改的文件
包含
599 行增加
和
176 行删除
| @@ -121,24 +121,7 @@ | @@ -121,24 +121,7 @@ | ||
| 121 | return parseInt(index)+1; | 121 | return parseInt(index)+1; |
| 122 | } | 122 | } |
| 123 | }, | 123 | }, |
| 124 | - { | ||
| 125 | - title:'送货时间', | ||
| 126 | - align:"center", | ||
| 127 | - dataIndex: 'deliveryTime', | ||
| 128 | - customRender:function (text) { | ||
| 129 | - return !text?"":(text.length>10?text.substr(0,10):text) | ||
| 130 | - } | ||
| 131 | - }, | ||
| 132 | - { | ||
| 133 | - title:'交接人', | ||
| 134 | - align:"center", | ||
| 135 | - dataIndex: 'jiaojieren' | ||
| 136 | - }, | ||
| 137 | - { | ||
| 138 | - title:'送货单扫描件', | ||
| 139 | - align:"center", | ||
| 140 | - dataIndex: 'scannedCopies' | ||
| 141 | - }, | 124 | + |
| 142 | { | 125 | { |
| 143 | title:'开票时间', | 126 | title:'开票时间', |
| 144 | align:"center", | 127 | align:"center", |
| @@ -122,26 +122,6 @@ | @@ -122,26 +122,6 @@ | ||
| 122 | } | 122 | } |
| 123 | }, | 123 | }, |
| 124 | { | 124 | { |
| 125 | - title:'投标价格(不含税)', | ||
| 126 | - align:"center", | ||
| 127 | - dataIndex: 'bidPrice' | ||
| 128 | - }, | ||
| 129 | - { | ||
| 130 | - title:'中标单价', | ||
| 131 | - align:"center", | ||
| 132 | - dataIndex: 'zhongPrice' | ||
| 133 | - }, | ||
| 134 | - { | ||
| 135 | - title:'中标数量', | ||
| 136 | - align:"center", | ||
| 137 | - dataIndex: 'zhongNum' | ||
| 138 | - }, | ||
| 139 | - { | ||
| 140 | - title:'中标总价', | ||
| 141 | - align:"center", | ||
| 142 | - dataIndex: 'totalPrice' | ||
| 143 | - }, | ||
| 144 | - { | ||
| 145 | title:'采购厂商', | 125 | title:'采购厂商', |
| 146 | align:"center", | 126 | align:"center", |
| 147 | dataIndex: 'cgManufacturer' | 127 | dataIndex: 'cgManufacturer' |
| @@ -208,6 +188,24 @@ | @@ -208,6 +188,24 @@ | ||
| 208 | dataIndex: 'notes' | 188 | dataIndex: 'notes' |
| 209 | }, | 189 | }, |
| 210 | { | 190 | { |
| 191 | + title:'送货时间', | ||
| 192 | + align:"center", | ||
| 193 | + dataIndex: 'songTime', | ||
| 194 | + customRender:function (text) { | ||
| 195 | + return !text?"":(text.length>10?text.substr(0,10):text) | ||
| 196 | + } | ||
| 197 | + }, | ||
| 198 | + { | ||
| 199 | + title:'交接人', | ||
| 200 | + align:"center", | ||
| 201 | + dataIndex: 'jiaojieren' | ||
| 202 | + }, | ||
| 203 | + { | ||
| 204 | + title:'送货单扫描件', | ||
| 205 | + align:"center", | ||
| 206 | + dataIndex: 'scannedCopies' | ||
| 207 | + }, | ||
| 208 | + { | ||
| 211 | title:'毛利润', | 209 | title:'毛利润', |
| 212 | align:"center", | 210 | align:"center", |
| 213 | dataIndex: 'profit' | 211 | dataIndex: 'profit' |
src/views/trad/TblTradTouList.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <a-card :bordered="false"> | ||
| 3 | + <!-- 查询区域 --> | ||
| 4 | + <div class="table-page-search-wrapper"> | ||
| 5 | + <a-form layout="inline" @keyup.enter.native="searchQuery"> | ||
| 6 | + <a-row :gutter="24"> | ||
| 7 | + </a-row> | ||
| 8 | + </a-form> | ||
| 9 | + </div> | ||
| 10 | + <!-- 查询区域-END --> | ||
| 11 | + | ||
| 12 | + <!-- 操作按钮区域 --> | ||
| 13 | + <div class="table-operator"> | ||
| 14 | + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | ||
| 15 | + <a-button type="primary" icon="download" @click="handleExportXls('tbl_trad_tou')">导出</a-button> | ||
| 16 | + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | ||
| 17 | + <a-button type="primary" icon="import">导入</a-button> | ||
| 18 | + </a-upload> | ||
| 19 | + <!-- 高级查询区域 --> | ||
| 20 | + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> | ||
| 21 | + <a-dropdown v-if="selectedRowKeys.length > 0"> | ||
| 22 | + <a-menu slot="overlay"> | ||
| 23 | + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | ||
| 24 | + </a-menu> | ||
| 25 | + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | ||
| 26 | + </a-dropdown> | ||
| 27 | + </div> | ||
| 28 | + | ||
| 29 | + <!-- table区域-begin --> | ||
| 30 | + <div> | ||
| 31 | + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | ||
| 32 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | ||
| 33 | + <a style="margin-left: 24px" @click="onClearSelected">清空</a> | ||
| 34 | + </div> | ||
| 35 | + | ||
| 36 | + <a-table | ||
| 37 | + ref="table" | ||
| 38 | + size="middle" | ||
| 39 | + :scroll="{x:true}" | ||
| 40 | + bordered | ||
| 41 | + rowKey="id" | ||
| 42 | + :columns="columns" | ||
| 43 | + :dataSource="dataSource" | ||
| 44 | + :pagination="ipagination" | ||
| 45 | + :loading="loading" | ||
| 46 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | ||
| 47 | + class="j-table-force-nowrap" | ||
| 48 | + @change="handleTableChange"> | ||
| 49 | + | ||
| 50 | + <template slot="htmlSlot" slot-scope="text"> | ||
| 51 | + <div v-html="text"></div> | ||
| 52 | + </template> | ||
| 53 | + <template slot="imgSlot" slot-scope="text,record"> | ||
| 54 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | ||
| 55 | + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | ||
| 56 | + </template> | ||
| 57 | + <template slot="fileSlot" slot-scope="text"> | ||
| 58 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | ||
| 59 | + <a-button | ||
| 60 | + v-else | ||
| 61 | + :ghost="true" | ||
| 62 | + type="primary" | ||
| 63 | + icon="download" | ||
| 64 | + size="small" | ||
| 65 | + @click="downloadFile(text)"> | ||
| 66 | + 下载 | ||
| 67 | + </a-button> | ||
| 68 | + </template> | ||
| 69 | + | ||
| 70 | + <span slot="action" slot-scope="text, record"> | ||
| 71 | + <a @click="handleEdit(record)">编辑</a> | ||
| 72 | + | ||
| 73 | + <a-divider type="vertical" /> | ||
| 74 | + <a-dropdown> | ||
| 75 | + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | ||
| 76 | + <a-menu slot="overlay"> | ||
| 77 | + <a-menu-item> | ||
| 78 | + <a @click="handleDetail(record)">详情</a> | ||
| 79 | + </a-menu-item> | ||
| 80 | + <a-menu-item> | ||
| 81 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | ||
| 82 | + <a>删除</a> | ||
| 83 | + </a-popconfirm> | ||
| 84 | + </a-menu-item> | ||
| 85 | + </a-menu> | ||
| 86 | + </a-dropdown> | ||
| 87 | + </span> | ||
| 88 | + | ||
| 89 | + </a-table> | ||
| 90 | + </div> | ||
| 91 | + | ||
| 92 | + <tbl-trad-tou-modal ref="modalForm" @ok="modalFormOk"></tbl-trad-tou-modal> | ||
| 93 | + </a-card> | ||
| 94 | +</template> | ||
| 95 | + | ||
| 96 | +<script> | ||
| 97 | + | ||
| 98 | + import '@/assets/less/TableExpand.less' | ||
| 99 | + import { mixinDevice } from '@/utils/mixin' | ||
| 100 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
| 101 | + import TblTradTouModal from './modules/tou/TblTradTouModal' | ||
| 102 | + | ||
| 103 | + export default { | ||
| 104 | + name: 'TblTradTouList', | ||
| 105 | + mixins:[JeecgListMixin, mixinDevice], | ||
| 106 | + components: { | ||
| 107 | + TblTradTouModal | ||
| 108 | + }, | ||
| 109 | + data () { | ||
| 110 | + return { | ||
| 111 | + description: 'tbl_trad_tou管理页面', | ||
| 112 | + // 表头 | ||
| 113 | + columns: [ | ||
| 114 | + { | ||
| 115 | + title: '#', | ||
| 116 | + dataIndex: '', | ||
| 117 | + key:'rowIndex', | ||
| 118 | + width:60, | ||
| 119 | + align:"center", | ||
| 120 | + customRender:function (t,r,index) { | ||
| 121 | + return parseInt(index)+1; | ||
| 122 | + } | ||
| 123 | + }, | ||
| 124 | + { | ||
| 125 | + title:'投标价格(不含税)', | ||
| 126 | + align:"center", | ||
| 127 | + dataIndex: 'bidPrice' | ||
| 128 | + }, | ||
| 129 | + { | ||
| 130 | + title:'中标单价', | ||
| 131 | + align:"center", | ||
| 132 | + dataIndex: 'zhongPrice' | ||
| 133 | + }, | ||
| 134 | + { | ||
| 135 | + title:'中标数量', | ||
| 136 | + align:"center", | ||
| 137 | + dataIndex: 'zhongNum' | ||
| 138 | + }, | ||
| 139 | + { | ||
| 140 | + title:'中标总价', | ||
| 141 | + align:"center", | ||
| 142 | + dataIndex: 'totalPrice' | ||
| 143 | + }, | ||
| 144 | + { | ||
| 145 | + title: '操作', | ||
| 146 | + dataIndex: 'action', | ||
| 147 | + align:"center", | ||
| 148 | + fixed:"right", | ||
| 149 | + width:147, | ||
| 150 | + scopedSlots: { customRender: 'action' } | ||
| 151 | + } | ||
| 152 | + ], | ||
| 153 | + url: { | ||
| 154 | + list: "/trad/tblTradTou/list", | ||
| 155 | + delete: "/trad/tblTradTou/delete", | ||
| 156 | + deleteBatch: "/trad/tblTradTou/deleteBatch", | ||
| 157 | + exportXlsUrl: "/trad/tblTradTou/exportXls", | ||
| 158 | + importExcelUrl: "trad/tblTradTou/importExcel", | ||
| 159 | + | ||
| 160 | + }, | ||
| 161 | + dictOptions:{}, | ||
| 162 | + superFieldList:[], | ||
| 163 | + } | ||
| 164 | + }, | ||
| 165 | + created() { | ||
| 166 | + this.getSuperFieldList(); | ||
| 167 | + }, | ||
| 168 | + computed: { | ||
| 169 | + importExcelUrl: function(){ | ||
| 170 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
| 171 | + }, | ||
| 172 | + }, | ||
| 173 | + methods: { | ||
| 174 | + initDictConfig(){ | ||
| 175 | + }, | ||
| 176 | + getSuperFieldList(){ | ||
| 177 | + let fieldList=[]; | ||
| 178 | + fieldList.push({type:'number',value:'bidPrice',text:'投标价格(不含税)'}) | ||
| 179 | + fieldList.push({type:'number',value:'zhongPrice',text:'中标单价'}) | ||
| 180 | + fieldList.push({type:'int',value:'zhongNum',text:'中标数量'}) | ||
| 181 | + fieldList.push({type:'number',value:'totalPrice',text:'中标总价'}) | ||
| 182 | + this.superFieldList = fieldList | ||
| 183 | + } | ||
| 184 | + } | ||
| 185 | + } | ||
| 186 | +</script> | ||
| 187 | +<style scoped> | ||
| 188 | + @import '~@assets/less/common.less'; | ||
| 189 | +</style> |
| @@ -5,37 +5,37 @@ | @@ -5,37 +5,37 @@ | ||
| 5 | <a-row> | 5 | <a-row> |
| 6 | <a-col :span="24"> | 6 | <a-col :span="24"> |
| 7 | <a-form-model-item label="招标号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenderNumber"> | 7 | <a-form-model-item label="招标号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenderNumber"> |
| 8 | - <a-input v-model="model.tenderNumber" placeholder="请输入招标号" ></a-input> | 8 | + <a-input v-model="model.tenderNumber" placeholder="请输入招标号"></a-input> |
| 9 | </a-form-model-item> | 9 | </a-form-model-item> |
| 10 | </a-col> | 10 | </a-col> |
| 11 | <a-col :span="24"> | 11 | <a-col :span="24"> |
| 12 | <a-form-model-item label="客户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customer"> | 12 | <a-form-model-item label="客户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customer"> |
| 13 | - <a-input v-model="model.customer" placeholder="请输入客户" ></a-input> | 13 | + <a-input v-model="model.customer" placeholder="请输入客户"></a-input> |
| 14 | </a-form-model-item> | 14 | </a-form-model-item> |
| 15 | </a-col> | 15 | </a-col> |
| 16 | <a-col :span="24"> | 16 | <a-col :span="24"> |
| 17 | <a-form-model-item label="客户采购" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="procurement"> | 17 | <a-form-model-item label="客户采购" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="procurement"> |
| 18 | - <a-input v-model="model.procurement" placeholder="请输入客户采购" ></a-input> | 18 | + <a-input v-model="model.procurement" placeholder="请输入客户采购"></a-input> |
| 19 | </a-form-model-item> | 19 | </a-form-model-item> |
| 20 | </a-col> | 20 | </a-col> |
| 21 | <a-col :span="24"> | 21 | <a-col :span="24"> |
| 22 | <a-form-model-item label="客户料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber"> | 22 | <a-form-model-item label="客户料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber"> |
| 23 | - <a-input v-model="model.partNumber" placeholder="请输入客户料号" ></a-input> | 23 | + <a-input v-model="model.partNumber" placeholder="请输入客户料号"></a-input> |
| 24 | </a-form-model-item> | 24 | </a-form-model-item> |
| 25 | </a-col> | 25 | </a-col> |
| 26 | <a-col :span="24"> | 26 | <a-col :span="24"> |
| 27 | <a-form-model-item label="物料描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description"> | 27 | <a-form-model-item label="物料描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description"> |
| 28 | - <a-input v-model="model.description" placeholder="请输入物料描述" ></a-input> | 28 | + <a-input v-model="model.description" placeholder="请输入物料描述"></a-input> |
| 29 | </a-form-model-item> | 29 | </a-form-model-item> |
| 30 | </a-col> | 30 | </a-col> |
| 31 | <a-col :span="24"> | 31 | <a-col :span="24"> |
| 32 | <a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productname"> | 32 | <a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productname"> |
| 33 | - <a-input v-model="model.productname" placeholder="请输入品名" ></a-input> | 33 | + <a-input v-model="model.productname" placeholder="请输入品名"></a-input> |
| 34 | </a-form-model-item> | 34 | </a-form-model-item> |
| 35 | </a-col> | 35 | </a-col> |
| 36 | <a-col :span="24"> | 36 | <a-col :span="24"> |
| 37 | <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications"> | 37 | <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications"> |
| 38 | - <a-input v-model="model.specifications" placeholder="请输入规格" ></a-input> | 38 | + <a-input v-model="model.specifications" placeholder="请输入规格"></a-input> |
| 39 | </a-form-model-item> | 39 | </a-form-model-item> |
| 40 | </a-col> | 40 | </a-col> |
| 41 | <a-col :span="24"> | 41 | <a-col :span="24"> |
| @@ -45,37 +45,37 @@ | @@ -45,37 +45,37 @@ | ||
| 45 | </a-col> | 45 | </a-col> |
| 46 | <a-col :span="24"> | 46 | <a-col :span="24"> |
| 47 | <a-form-model-item label="计量单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei"> | 47 | <a-form-model-item label="计量单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei"> |
| 48 | - <a-input v-model="model.danwei" placeholder="请输入计量单位" ></a-input> | 48 | + <a-input v-model="model.danwei" placeholder="请输入计量单位"></a-input> |
| 49 | </a-form-model-item> | 49 | </a-form-model-item> |
| 50 | </a-col> | 50 | </a-col> |
| 51 | <a-col :span="24"> | 51 | <a-col :span="24"> |
| 52 | <a-form-model-item label="客户需求单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="company"> | 52 | <a-form-model-item label="客户需求单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="company"> |
| 53 | - <a-input v-model="model.company" placeholder="请输入客户需求单位" ></a-input> | 53 | + <a-input v-model="model.company" placeholder="请输入客户需求单位"></a-input> |
| 54 | </a-form-model-item> | 54 | </a-form-model-item> |
| 55 | </a-col> | 55 | </a-col> |
| 56 | <a-col :span="24"> | 56 | <a-col :span="24"> |
| 57 | <a-form-model-item label="交货日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime"> | 57 | <a-form-model-item label="交货日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime"> |
| 58 | - <j-date placeholder="请选择交货日期" v-model="model.deliveryTime" style="width: 100%" /> | 58 | + <j-date placeholder="请选择交货日期" v-model="model.deliveryTime" style="width: 100%" /> |
| 59 | </a-form-model-item> | 59 | </a-form-model-item> |
| 60 | </a-col> | 60 | </a-col> |
| 61 | <a-col :span="24"> | 61 | <a-col :span="24"> |
| 62 | <a-form-model-item label="备注(品牌要求)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes"> | 62 | <a-form-model-item label="备注(品牌要求)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes"> |
| 63 | - <a-input v-model="model.notes" placeholder="请输入备注(品牌要求)" ></a-input> | 63 | + <a-input v-model="model.notes" placeholder="请输入备注(品牌要求)"></a-input> |
| 64 | </a-form-model-item> | 64 | </a-form-model-item> |
| 65 | </a-col> | 65 | </a-col> |
| 66 | <a-col :span="24"> | 66 | <a-col :span="24"> |
| 67 | <a-form-model-item label="客户设计" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="design"> | 67 | <a-form-model-item label="客户设计" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="design"> |
| 68 | - <a-input v-model="model.design" placeholder="请输入客户设计" ></a-input> | 68 | + <a-input v-model="model.design" placeholder="请输入客户设计"></a-input> |
| 69 | </a-form-model-item> | 69 | </a-form-model-item> |
| 70 | </a-col> | 70 | </a-col> |
| 71 | <a-col :span="24"> | 71 | <a-col :span="24"> |
| 72 | <a-form-model-item label="联系方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone"> | 72 | <a-form-model-item label="联系方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone"> |
| 73 | - <a-input v-model="model.phone" placeholder="请输入联系方式" ></a-input> | 73 | + <a-input v-model="model.phone" placeholder="请输入联系方式"></a-input> |
| 74 | </a-form-model-item> | 74 | </a-form-model-item> |
| 75 | </a-col> | 75 | </a-col> |
| 76 | <a-col :span="24"> | 76 | <a-col :span="24"> |
| 77 | <a-form-model-item label="图纸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="picture"> | 77 | <a-form-model-item label="图纸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="picture"> |
| 78 | - <a-input v-model="model.picture" placeholder="请输入图纸" ></a-input> | 78 | + <a-input v-model="model.picture" placeholder="请输入图纸"></a-input> |
| 79 | </a-form-model-item> | 79 | </a-form-model-item> |
| 80 | </a-col> | 80 | </a-col> |
| 81 | </a-row> | 81 | </a-row> |
| @@ -85,90 +85,99 @@ | @@ -85,90 +85,99 @@ | ||
| 85 | </template> | 85 | </template> |
| 86 | 86 | ||
| 87 | <script> | 87 | <script> |
| 88 | +import { httpAction, getAction } from '@/api/manage' | ||
| 89 | +import { validateDuplicateValue } from '@/utils/util' | ||
| 88 | 90 | ||
| 89 | - import { httpAction, getAction } from '@/api/manage' | ||
| 90 | - import { validateDuplicateValue } from '@/utils/util' | ||
| 91 | - | ||
| 92 | - export default { | ||
| 93 | - name: 'TblTradBaseForm', | ||
| 94 | - components: { | ||
| 95 | - }, | ||
| 96 | - props: { | ||
| 97 | - //表单禁用 | ||
| 98 | - disabled: { | ||
| 99 | - type: Boolean, | ||
| 100 | - default: false, | ||
| 101 | - required: false | ||
| 102 | - } | 91 | +export default { |
| 92 | + name: 'TblTradBaseForm', | ||
| 93 | + components: {}, | ||
| 94 | + props: { | ||
| 95 | + //表单禁用 | ||
| 96 | + disabled: { | ||
| 97 | + type: Boolean, | ||
| 98 | + default: false, | ||
| 99 | + required: false, | ||
| 103 | }, | 100 | }, |
| 104 | - data () { | ||
| 105 | - return { | ||
| 106 | - model:{ | ||
| 107 | - }, | ||
| 108 | - labelCol: { | ||
| 109 | - xs: { span: 24 }, | ||
| 110 | - sm: { span: 5 }, | ||
| 111 | - }, | ||
| 112 | - wrapperCol: { | ||
| 113 | - xs: { span: 24 }, | ||
| 114 | - sm: { span: 16 }, | ||
| 115 | - }, | ||
| 116 | - confirmLoading: false, | ||
| 117 | - validatorRules: { | ||
| 118 | - }, | ||
| 119 | - url: { | ||
| 120 | - add: "/trad/tblTradBase/add", | ||
| 121 | - edit: "/trad/tblTradBase/edit", | ||
| 122 | - queryById: "/trad/tblTradBase/queryById" | ||
| 123 | - } | ||
| 124 | - } | ||
| 125 | - }, | ||
| 126 | - computed: { | ||
| 127 | - formDisabled(){ | ||
| 128 | - return this.disabled | 101 | + }, |
| 102 | + data() { | ||
| 103 | + return { | ||
| 104 | + model: {}, | ||
| 105 | + labelCol: { | ||
| 106 | + xs: { span: 24 }, | ||
| 107 | + sm: { span: 5 }, | ||
| 129 | }, | 108 | }, |
| 130 | - }, | ||
| 131 | - created () { | ||
| 132 | - //备份model原始值 | ||
| 133 | - this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
| 134 | - }, | ||
| 135 | - methods: { | ||
| 136 | - add () { | ||
| 137 | - this.edit(this.modelDefault); | 109 | + wrapperCol: { |
| 110 | + xs: { span: 24 }, | ||
| 111 | + sm: { span: 16 }, | ||
| 138 | }, | 112 | }, |
| 139 | - edit (record) { | ||
| 140 | - this.model = Object.assign({}, record); | ||
| 141 | - this.visible = true; | 113 | + confirmLoading: false, |
| 114 | + validatorRules: { | ||
| 115 | + // tenderNumber: [{ required: true, message: '请输入姓名!' }], | ||
| 116 | + // customer: [{ required: true, message: '请输入身份证号!' }], | ||
| 117 | + // procurement: [{ required: true, message: '请输入银行卡号!' }], | ||
| 118 | + // partNumber: [{ required: true, message: '请输入基本工资!' }], | ||
| 119 | + // description: [{ required: true, message: '请输入工作职位!' }], | ||
| 120 | + // productname: [{ required: true, message: '请输入餐费单价!' }], | ||
| 121 | + // specifications: [{ required: true, message: '请输入社保公司!' }], | ||
| 122 | + // num: [{ required: true, message: '请输入社保个人!' }], | ||
| 123 | + // danwei: [{ required: true, message: '请输入工时单价!' }], | ||
| 124 | + // company: [{ required: true, message: '请输入比例!' }], | ||
| 125 | + | ||
| 142 | }, | 126 | }, |
| 143 | - submitForm () { | ||
| 144 | - const that = this; | ||
| 145 | - // 触发表单验证 | ||
| 146 | - this.$refs.form.validate(valid => { | ||
| 147 | - if (valid) { | ||
| 148 | - that.confirmLoading = true; | ||
| 149 | - let httpurl = ''; | ||
| 150 | - let method = ''; | ||
| 151 | - if(!this.model.id){ | ||
| 152 | - httpurl+=this.url.add; | ||
| 153 | - method = 'post'; | ||
| 154 | - }else{ | ||
| 155 | - httpurl+=this.url.edit; | ||
| 156 | - method = 'put'; | ||
| 157 | - } | ||
| 158 | - httpAction(httpurl,this.model,method).then((res)=>{ | ||
| 159 | - if(res.success){ | ||
| 160 | - that.$message.success(res.message); | ||
| 161 | - that.$emit('ok'); | ||
| 162 | - }else{ | ||
| 163 | - that.$message.warning(res.message); | ||
| 164 | - } | ||
| 165 | - }).finally(() => { | ||
| 166 | - that.confirmLoading = false; | ||
| 167 | - }) | ||
| 168 | - } | ||
| 169 | - | ||
| 170 | - }) | 127 | + url: { |
| 128 | + add: '/trad/tblTradBase/add', | ||
| 129 | + edit: '/trad/tblTradBase/edit', | ||
| 130 | + queryById: '/trad/tblTradBase/queryById', | ||
| 171 | }, | 131 | }, |
| 172 | } | 132 | } |
| 173 | - } | 133 | + }, |
| 134 | + computed: { | ||
| 135 | + formDisabled() { | ||
| 136 | + return this.disabled | ||
| 137 | + }, | ||
| 138 | + }, | ||
| 139 | + created() { | ||
| 140 | + //备份model原始值 | ||
| 141 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)) | ||
| 142 | + }, | ||
| 143 | + methods: { | ||
| 144 | + add() { | ||
| 145 | + this.edit(this.modelDefault) | ||
| 146 | + }, | ||
| 147 | + edit(record) { | ||
| 148 | + this.model = Object.assign({}, record) | ||
| 149 | + this.visible = true | ||
| 150 | + }, | ||
| 151 | + submitForm() { | ||
| 152 | + const that = this | ||
| 153 | + // 触发表单验证 | ||
| 154 | + this.$refs.form.validate((valid) => { | ||
| 155 | + if (valid) { | ||
| 156 | + that.confirmLoading = true | ||
| 157 | + let httpurl = '' | ||
| 158 | + let method = '' | ||
| 159 | + if (!this.model.id) { | ||
| 160 | + httpurl += this.url.add | ||
| 161 | + method = 'post' | ||
| 162 | + } else { | ||
| 163 | + httpurl += this.url.edit | ||
| 164 | + method = 'put' | ||
| 165 | + } | ||
| 166 | + httpAction(httpurl, this.model, method) | ||
| 167 | + .then((res) => { | ||
| 168 | + if (res.success) { | ||
| 169 | + that.$message.success(res.message) | ||
| 170 | + that.$emit('ok') | ||
| 171 | + } else { | ||
| 172 | + that.$message.warning(res.message) | ||
| 173 | + } | ||
| 174 | + }) | ||
| 175 | + .finally(() => { | ||
| 176 | + that.confirmLoading = false | ||
| 177 | + }) | ||
| 178 | + } | ||
| 179 | + }) | ||
| 180 | + }, | ||
| 181 | + }, | ||
| 182 | +} | ||
| 174 | </script> | 183 | </script> |
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | 14 | ||
| 15 | <script> | 15 | <script> |
| 16 | 16 | ||
| 17 | - import TblTradBaseForm from '././TblTradBaseForm' | 17 | + import TblTradBaseForm from './TblTradBaseForm' |
| 18 | export default { | 18 | export default { |
| 19 | name: 'TblTradBaseModal', | 19 | name: 'TblTradBaseModal', |
| 20 | components: { | 20 | components: { |
| @@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
| 17 | 17 | ||
| 18 | <script> | 18 | <script> |
| 19 | 19 | ||
| 20 | - import TblTradContractForm from '././TblTradContractForm' | 20 | + import TblTradContractForm from './TblTradContractForm' |
| 21 | 21 | ||
| 22 | export default { | 22 | export default { |
| 23 | name: 'TblTradContractModal', | 23 | name: 'TblTradContractModal', |
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | 14 | ||
| 15 | <script> | 15 | <script> |
| 16 | 16 | ||
| 17 | - import TblTradContractForm from '././TblTradContractForm' | 17 | + import TblTradContractForm from './TblTradContractForm' |
| 18 | export default { | 18 | export default { |
| 19 | name: 'TblTradContractModal', | 19 | name: 'TblTradContractModal', |
| 20 | components: { | 20 | components: { |
| @@ -3,21 +3,7 @@ | @@ -3,21 +3,7 @@ | ||
| 3 | <j-form-container :disabled="formDisabled"> | 3 | <j-form-container :disabled="formDisabled"> |
| 4 | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | 4 | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| 5 | <a-row> | 5 | <a-row> |
| 6 | - <a-col :span="24"> | ||
| 7 | - <a-form-model-item label="送货时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime"> | ||
| 8 | - <j-date placeholder="请选择送货时间" v-model="model.deliveryTime" style="width: 100%" /> | ||
| 9 | - </a-form-model-item> | ||
| 10 | - </a-col> | ||
| 11 | - <a-col :span="24"> | ||
| 12 | - <a-form-model-item label="交接人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jiaojieren"> | ||
| 13 | - <a-input v-model="model.jiaojieren" placeholder="请输入交接人" ></a-input> | ||
| 14 | - </a-form-model-item> | ||
| 15 | - </a-col> | ||
| 16 | - <a-col :span="24"> | ||
| 17 | - <a-form-model-item label="送货单扫描件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="scannedCopies"> | ||
| 18 | - <a-input v-model="model.scannedCopies" placeholder="请输入送货单扫描件" ></a-input> | ||
| 19 | - </a-form-model-item> | ||
| 20 | - </a-col> | 6 | + |
| 21 | <a-col :span="24"> | 7 | <a-col :span="24"> |
| 22 | <a-form-model-item label="开票时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="invoicingTime"> | 8 | <a-form-model-item label="开票时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="invoicingTime"> |
| 23 | <j-date placeholder="请选择开票时间" v-model="model.invoicingTime" style="width: 100%" /> | 9 | <j-date placeholder="请选择开票时间" v-model="model.invoicingTime" style="width: 100%" /> |
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | 14 | ||
| 15 | <script> | 15 | <script> |
| 16 | 16 | ||
| 17 | - import TblTradFphkForm from '././TblTradFphkForm' | 17 | + import TblTradFphkForm from './TblTradFphkForm' |
| 18 | export default { | 18 | export default { |
| 19 | name: 'TblTradFphkModal', | 19 | name: 'TblTradFphkModal', |
| 20 | components: { | 20 | components: { |
| @@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
| 17 | 17 | ||
| 18 | <script> | 18 | <script> |
| 19 | 19 | ||
| 20 | - import TblTradInquiryForm from '././TblTradInquiryForm' | 20 | + import TblTradInquiryForm from './TblTradInquiryForm' |
| 21 | 21 | ||
| 22 | export default { | 22 | export default { |
| 23 | name: 'TblTradInquiryModal', | 23 | name: 'TblTradInquiryModal', |
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | 14 | ||
| 15 | <script> | 15 | <script> |
| 16 | 16 | ||
| 17 | - import TblTradInquiryForm from '././TblTradInquiryForm' | 17 | + import TblTradInquiryForm from './TblTradInquiryForm' |
| 18 | export default { | 18 | export default { |
| 19 | name: 'TblTradInquiryModal', | 19 | name: 'TblTradInquiryModal', |
| 20 | components: { | 20 | components: { |
| @@ -4,26 +4,6 @@ | @@ -4,26 +4,6 @@ | ||
| 4 | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | 4 | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| 5 | <a-row> | 5 | <a-row> |
| 6 | <a-col :span="24"> | 6 | <a-col :span="24"> |
| 7 | - <a-form-model-item label="投标价格(不含税)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bidPrice"> | ||
| 8 | - <a-input-number v-model="model.bidPrice" placeholder="请输入投标价格(不含税)" style="width: 100%" /> | ||
| 9 | - </a-form-model-item> | ||
| 10 | - </a-col> | ||
| 11 | - <a-col :span="24"> | ||
| 12 | - <a-form-model-item label="中标单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zhongPrice"> | ||
| 13 | - <a-input-number v-model="model.zhongPrice" placeholder="请输入中标单价" style="width: 100%" /> | ||
| 14 | - </a-form-model-item> | ||
| 15 | - </a-col> | ||
| 16 | - <a-col :span="24"> | ||
| 17 | - <a-form-model-item label="中标数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zhongNum"> | ||
| 18 | - <a-input-number v-model="model.zhongNum" placeholder="请输入中标数量" style="width: 100%" /> | ||
| 19 | - </a-form-model-item> | ||
| 20 | - </a-col> | ||
| 21 | - <a-col :span="24"> | ||
| 22 | - <a-form-model-item label="中标总价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalPrice"> | ||
| 23 | - <a-input-number v-model="model.totalPrice" placeholder="请输入中标总价" style="width: 100%" /> | ||
| 24 | - </a-form-model-item> | ||
| 25 | - </a-col> | ||
| 26 | - <a-col :span="24"> | ||
| 27 | <a-form-model-item label="采购厂商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cgManufacturer"> | 7 | <a-form-model-item label="采购厂商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cgManufacturer"> |
| 28 | <a-input v-model="model.cgManufacturer" placeholder="请输入采购厂商" ></a-input> | 8 | <a-input v-model="model.cgManufacturer" placeholder="请输入采购厂商" ></a-input> |
| 29 | </a-form-model-item> | 9 | </a-form-model-item> |
| @@ -84,6 +64,21 @@ | @@ -84,6 +64,21 @@ | ||
| 84 | </a-form-model-item> | 64 | </a-form-model-item> |
| 85 | </a-col> | 65 | </a-col> |
| 86 | <a-col :span="24"> | 66 | <a-col :span="24"> |
| 67 | + <a-form-model-item label="送货时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime"> | ||
| 68 | + <j-date placeholder="请选择送货时间" v-model="model.deliveryTime" style="width: 100%" /> | ||
| 69 | + </a-form-model-item> | ||
| 70 | + </a-col> | ||
| 71 | + <a-col :span="24"> | ||
| 72 | + <a-form-model-item label="交接人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jiaojieren"> | ||
| 73 | + <a-input v-model="model.jiaojieren" placeholder="请输入交接人" ></a-input> | ||
| 74 | + </a-form-model-item> | ||
| 75 | + </a-col> | ||
| 76 | + <a-col :span="24"> | ||
| 77 | + <a-form-model-item label="送货单扫描件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="scannedCopies"> | ||
| 78 | + <a-input v-model="model.scannedCopies" placeholder="请输入送货单扫描件" ></a-input> | ||
| 79 | + </a-form-model-item> | ||
| 80 | + </a-col> | ||
| 81 | + <a-col :span="24"> | ||
| 87 | <a-form-model-item label="毛利润" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="profit"> | 82 | <a-form-model-item label="毛利润" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="profit"> |
| 88 | <a-input-number v-model="model.profit" placeholder="请输入毛利润" style="width: 100%" /> | 83 | <a-input-number v-model="model.profit" placeholder="请输入毛利润" style="width: 100%" /> |
| 89 | </a-form-model-item> | 84 | </a-form-model-item> |
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | 14 | ||
| 15 | <script> | 15 | <script> |
| 16 | 16 | ||
| 17 | - import TblTradTenderForm from '././TblTradTenderForm' | 17 | + import TblTradTenderForm from './TblTradTenderForm' |
| 18 | export default { | 18 | export default { |
| 19 | name: 'TblTradTenderModal', | 19 | name: 'TblTradTenderModal', |
| 20 | components: { | 20 | components: { |
| 1 | +<template> | ||
| 2 | + <a-spin :spinning="confirmLoading"> | ||
| 3 | + <j-form-container :disabled="formDisabled"> | ||
| 4 | + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | ||
| 5 | + <a-row> | ||
| 6 | + <a-col :span="24"> | ||
| 7 | + <a-form-model-item label="投标价格(不含税)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bidPrice"> | ||
| 8 | + <a-input-number v-model="model.bidPrice" placeholder="请输入投标价格(不含税)" style="width: 100%" /> | ||
| 9 | + </a-form-model-item> | ||
| 10 | + </a-col> | ||
| 11 | + <a-col :span="24"> | ||
| 12 | + <a-form-model-item label="中标单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zhongPrice"> | ||
| 13 | + <a-input-number v-model="model.zhongPrice" placeholder="请输入中标单价" style="width: 100%" /> | ||
| 14 | + </a-form-model-item> | ||
| 15 | + </a-col> | ||
| 16 | + <a-col :span="24"> | ||
| 17 | + <a-form-model-item label="中标数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zhongNum"> | ||
| 18 | + <a-input-number v-model="model.zhongNum" placeholder="请输入中标数量" style="width: 100%" /> | ||
| 19 | + </a-form-model-item> | ||
| 20 | + </a-col> | ||
| 21 | + <a-col :span="24"> | ||
| 22 | + <a-form-model-item label="中标总价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalPrice"> | ||
| 23 | + <a-input-number v-model="model.totalPrice" placeholder="请输入中标总价" style="width: 100%" /> | ||
| 24 | + </a-form-model-item> | ||
| 25 | + </a-col> | ||
| 26 | + </a-row> | ||
| 27 | + </a-form-model> | ||
| 28 | + </j-form-container> | ||
| 29 | + </a-spin> | ||
| 30 | +</template> | ||
| 31 | + | ||
| 32 | +<script> | ||
| 33 | + | ||
| 34 | + import { httpAction, getAction } from '@/api/manage' | ||
| 35 | + import { validateDuplicateValue } from '@/utils/util' | ||
| 36 | + | ||
| 37 | + export default { | ||
| 38 | + name: 'TblTradTouForm', | ||
| 39 | + components: { | ||
| 40 | + }, | ||
| 41 | + props: { | ||
| 42 | + //表单禁用 | ||
| 43 | + disabled: { | ||
| 44 | + type: Boolean, | ||
| 45 | + default: false, | ||
| 46 | + required: false | ||
| 47 | + } | ||
| 48 | + }, | ||
| 49 | + data () { | ||
| 50 | + return { | ||
| 51 | + model:{ | ||
| 52 | + }, | ||
| 53 | + labelCol: { | ||
| 54 | + xs: { span: 24 }, | ||
| 55 | + sm: { span: 5 }, | ||
| 56 | + }, | ||
| 57 | + wrapperCol: { | ||
| 58 | + xs: { span: 24 }, | ||
| 59 | + sm: { span: 16 }, | ||
| 60 | + }, | ||
| 61 | + confirmLoading: false, | ||
| 62 | + validatorRules: { | ||
| 63 | + }, | ||
| 64 | + url: { | ||
| 65 | + add: "/trad/tblTradTou/add", | ||
| 66 | + edit: "/trad/tblTradTou/edit", | ||
| 67 | + queryById: "/trad/tblTradTou/queryById" | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | + }, | ||
| 71 | + computed: { | ||
| 72 | + formDisabled(){ | ||
| 73 | + return this.disabled | ||
| 74 | + }, | ||
| 75 | + }, | ||
| 76 | + created () { | ||
| 77 | + //备份model原始值 | ||
| 78 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
| 79 | + }, | ||
| 80 | + methods: { | ||
| 81 | + add () { | ||
| 82 | + this.edit(this.modelDefault); | ||
| 83 | + }, | ||
| 84 | + edit (record) { | ||
| 85 | + this.model = Object.assign({}, record); | ||
| 86 | + this.visible = true; | ||
| 87 | + }, | ||
| 88 | + submitForm () { | ||
| 89 | + const that = this; | ||
| 90 | + // 触发表单验证 | ||
| 91 | + this.$refs.form.validate(valid => { | ||
| 92 | + if (valid) { | ||
| 93 | + that.confirmLoading = true; | ||
| 94 | + let httpurl = ''; | ||
| 95 | + let method = ''; | ||
| 96 | + if(!this.model.id){ | ||
| 97 | + httpurl+=this.url.add; | ||
| 98 | + method = 'post'; | ||
| 99 | + }else{ | ||
| 100 | + httpurl+=this.url.edit; | ||
| 101 | + method = 'put'; | ||
| 102 | + } | ||
| 103 | + httpAction(httpurl,this.model,method).then((res)=>{ | ||
| 104 | + if(res.success){ | ||
| 105 | + that.$message.success(res.message); | ||
| 106 | + that.$emit('ok'); | ||
| 107 | + }else{ | ||
| 108 | + that.$message.warning(res.message); | ||
| 109 | + } | ||
| 110 | + }).finally(() => { | ||
| 111 | + that.confirmLoading = false; | ||
| 112 | + }) | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + }) | ||
| 116 | + }, | ||
| 117 | + } | ||
| 118 | + } | ||
| 119 | +</script> |
| 1 | +<template> | ||
| 2 | + <a-drawer | ||
| 3 | + :title="title" | ||
| 4 | + :width="width" | ||
| 5 | + placement="right" | ||
| 6 | + :closable="false" | ||
| 7 | + @close="close" | ||
| 8 | + destroyOnClose | ||
| 9 | + :visible="visible"> | ||
| 10 | + <tbl-trad-tou-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tbl-trad-tou-form> | ||
| 11 | + <div class="drawer-footer"> | ||
| 12 | + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> | ||
| 13 | + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> | ||
| 14 | + </div> | ||
| 15 | + </a-drawer> | ||
| 16 | +</template> | ||
| 17 | + | ||
| 18 | +<script> | ||
| 19 | + | ||
| 20 | + import TblTradTouForm from './TblTradTouForm' | ||
| 21 | + | ||
| 22 | + export default { | ||
| 23 | + name: 'TblTradTouModal', | ||
| 24 | + components: { | ||
| 25 | + TblTradTouForm | ||
| 26 | + }, | ||
| 27 | + data () { | ||
| 28 | + return { | ||
| 29 | + title:"操作", | ||
| 30 | + width:800, | ||
| 31 | + visible: false, | ||
| 32 | + disableSubmit: false | ||
| 33 | + } | ||
| 34 | + }, | ||
| 35 | + methods: { | ||
| 36 | + add () { | ||
| 37 | + this.visible=true | ||
| 38 | + this.$nextTick(()=>{ | ||
| 39 | + this.$refs.realForm.add(); | ||
| 40 | + }) | ||
| 41 | + }, | ||
| 42 | + edit (record) { | ||
| 43 | + this.visible=true | ||
| 44 | + this.$nextTick(()=>{ | ||
| 45 | + this.$refs.realForm.edit(record); | ||
| 46 | + }); | ||
| 47 | + }, | ||
| 48 | + close () { | ||
| 49 | + this.$emit('close'); | ||
| 50 | + this.visible = false; | ||
| 51 | + }, | ||
| 52 | + submitCallback(){ | ||
| 53 | + this.$emit('ok'); | ||
| 54 | + this.visible = false; | ||
| 55 | + }, | ||
| 56 | + handleOk () { | ||
| 57 | + this.$refs.realForm.submitForm(); | ||
| 58 | + }, | ||
| 59 | + handleCancel () { | ||
| 60 | + this.close() | ||
| 61 | + } | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | +</script> | ||
| 65 | + | ||
| 66 | +<style lang="less" scoped> | ||
| 67 | +/** Button按钮间距 */ | ||
| 68 | + .ant-btn { | ||
| 69 | + margin-left: 30px; | ||
| 70 | + margin-bottom: 30px; | ||
| 71 | + float: right; | ||
| 72 | + } | ||
| 73 | + .drawer-footer{ | ||
| 74 | + position: absolute; | ||
| 75 | + bottom: -8px; | ||
| 76 | + width: 100%; | ||
| 77 | + border-top: 1px solid #e8e8e8; | ||
| 78 | + padding: 10px 16px; | ||
| 79 | + text-align: right; | ||
| 80 | + left: 0; | ||
| 81 | + background: #fff; | ||
| 82 | + border-radius: 0 0 2px 2px; | ||
| 83 | + } | ||
| 84 | +</style> |
| 1 | +<template> | ||
| 2 | + <j-modal | ||
| 3 | + :title="title" | ||
| 4 | + :width="width" | ||
| 5 | + :visible="visible" | ||
| 6 | + switchFullscreen | ||
| 7 | + @ok="handleOk" | ||
| 8 | + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | ||
| 9 | + @cancel="handleCancel" | ||
| 10 | + cancelText="关闭"> | ||
| 11 | + <tbl-trad-tou-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tbl-trad-tou-form> | ||
| 12 | + </j-modal> | ||
| 13 | +</template> | ||
| 14 | + | ||
| 15 | +<script> | ||
| 16 | + | ||
| 17 | + import TblTradTouForm from './TblTradTouForm' | ||
| 18 | + export default { | ||
| 19 | + name: 'TblTradTouModal', | ||
| 20 | + components: { | ||
| 21 | + TblTradTouForm | ||
| 22 | + }, | ||
| 23 | + data () { | ||
| 24 | + return { | ||
| 25 | + title:'', | ||
| 26 | + width:800, | ||
| 27 | + visible: false, | ||
| 28 | + disableSubmit: false | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + methods: { | ||
| 32 | + add () { | ||
| 33 | + this.visible=true | ||
| 34 | + this.$nextTick(()=>{ | ||
| 35 | + this.$refs.realForm.add(); | ||
| 36 | + }) | ||
| 37 | + }, | ||
| 38 | + edit (record) { | ||
| 39 | + this.visible=true | ||
| 40 | + this.$nextTick(()=>{ | ||
| 41 | + this.$refs.realForm.edit(record); | ||
| 42 | + }) | ||
| 43 | + }, | ||
| 44 | + close () { | ||
| 45 | + this.$emit('close'); | ||
| 46 | + this.visible = false; | ||
| 47 | + }, | ||
| 48 | + handleOk () { | ||
| 49 | + this.$refs.realForm.submitForm(); | ||
| 50 | + }, | ||
| 51 | + submitCallback(){ | ||
| 52 | + this.$emit('ok'); | ||
| 53 | + this.visible = false; | ||
| 54 | + }, | ||
| 55 | + handleCancel () { | ||
| 56 | + this.close() | ||
| 57 | + } | ||
| 58 | + } | ||
| 59 | + } | ||
| 60 | +</script> |
-
请 注册 或 登录 后发表评论