作者 雷海东

... ... @@ -121,24 +121,7 @@
return parseInt(index)+1;
}
},
{
title:'送货时间',
align:"center",
dataIndex: 'deliveryTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'交接人',
align:"center",
dataIndex: 'jiaojieren'
},
{
title:'送货单扫描件',
align:"center",
dataIndex: 'scannedCopies'
},
{
title:'开票时间',
align:"center",
... ...
... ... @@ -122,26 +122,6 @@
}
},
{
title:'投标价格(不含税)',
align:"center",
dataIndex: 'bidPrice'
},
{
title:'中标单价',
align:"center",
dataIndex: 'zhongPrice'
},
{
title:'中标数量',
align:"center",
dataIndex: 'zhongNum'
},
{
title:'中标总价',
align:"center",
dataIndex: 'totalPrice'
},
{
title:'采购厂商',
align:"center",
dataIndex: 'cgManufacturer'
... ... @@ -208,6 +188,24 @@
dataIndex: 'notes'
},
{
title:'送货时间',
align:"center",
dataIndex: 'songTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'交接人',
align:"center",
dataIndex: 'jiaojieren'
},
{
title:'送货单扫描件',
align:"center",
dataIndex: 'scannedCopies'
},
{
title:'毛利润',
align:"center",
dataIndex: 'profit'
... ...
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tbl_trad_tou')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tbl-trad-tou-modal ref="modalForm" @ok="modalFormOk"></tbl-trad-tou-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblTradTouModal from './modules/tou/TblTradTouModal'
export default {
name: 'TblTradTouList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TblTradTouModal
},
data () {
return {
description: 'tbl_trad_tou管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'投标价格(不含税)',
align:"center",
dataIndex: 'bidPrice'
},
{
title:'中标单价',
align:"center",
dataIndex: 'zhongPrice'
},
{
title:'中标数量',
align:"center",
dataIndex: 'zhongNum'
},
{
title:'中标总价',
align:"center",
dataIndex: 'totalPrice'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/trad/tblTradTou/list",
delete: "/trad/tblTradTou/delete",
deleteBatch: "/trad/tblTradTou/deleteBatch",
exportXlsUrl: "/trad/tblTradTou/exportXls",
importExcelUrl: "trad/tblTradTou/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'number',value:'bidPrice',text:'投标价格(不含税)'})
fieldList.push({type:'number',value:'zhongPrice',text:'中标单价'})
fieldList.push({type:'int',value:'zhongNum',text:'中标数量'})
fieldList.push({type:'number',value:'totalPrice',text:'中标总价'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
... ...
... ... @@ -5,37 +5,37 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="招标号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenderNumber">
<a-input v-model="model.tenderNumber" placeholder="请输入招标号" ></a-input>
<a-input v-model="model.tenderNumber" placeholder="请输入招标号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="客户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customer">
<a-input v-model="model.customer" placeholder="请输入客户" ></a-input>
<a-input v-model="model.customer" placeholder="请输入客户"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="客户采购" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="procurement">
<a-input v-model="model.procurement" placeholder="请输入客户采购" ></a-input>
<a-input v-model="model.procurement" placeholder="请输入客户采购"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="客户料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber">
<a-input v-model="model.partNumber" placeholder="请输入客户料号" ></a-input>
<a-input v-model="model.partNumber" placeholder="请输入客户料号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="物料描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">
<a-input v-model="model.description" placeholder="请输入物料描述" ></a-input>
<a-input v-model="model.description" placeholder="请输入物料描述"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productname">
<a-input v-model="model.productname" placeholder="请输入品名" ></a-input>
<a-input v-model="model.productname" placeholder="请输入品名"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
<a-input v-model="model.specifications" placeholder="请输入规格" ></a-input>
<a-input v-model="model.specifications" placeholder="请输入规格"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
... ... @@ -45,37 +45,37 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="计量单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei">
<a-input v-model="model.danwei" placeholder="请输入计量单位" ></a-input>
<a-input v-model="model.danwei" placeholder="请输入计量单位"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="客户需求单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="company">
<a-input v-model="model.company" placeholder="请输入客户需求单位" ></a-input>
<a-input v-model="model.company" placeholder="请输入客户需求单位"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="交货日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime">
<j-date placeholder="请选择交货日期" v-model="model.deliveryTime" style="width: 100%" />
<j-date placeholder="请选择交货日期" v-model="model.deliveryTime" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注(品牌要求)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
<a-input v-model="model.notes" placeholder="请输入备注(品牌要求)" ></a-input>
<a-input v-model="model.notes" placeholder="请输入备注(品牌要求)"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="客户设计" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="design">
<a-input v-model="model.design" placeholder="请输入客户设计" ></a-input>
<a-input v-model="model.design" placeholder="请输入客户设计"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="联系方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input v-model="model.phone" placeholder="请输入联系方式" ></a-input>
<a-input v-model="model.phone" placeholder="请输入联系方式"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="图纸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="picture">
<a-input v-model="model.picture" placeholder="请输入图纸" ></a-input>
<a-input v-model="model.picture" placeholder="请输入图纸"></a-input>
</a-form-model-item>
</a-col>
</a-row>
... ... @@ -85,90 +85,99 @@
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TblTradBaseForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
export default {
name: 'TblTradBaseForm',
components: {},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false,
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/trad/tblTradBase/add",
edit: "/trad/tblTradBase/edit",
queryById: "/trad/tblTradBase/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
data() {
return {
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
confirmLoading: false,
validatorRules: {
// tenderNumber: [{ required: true, message: '请输入姓名!' }],
// customer: [{ required: true, message: '请输入身份证号!' }],
// procurement: [{ required: true, message: '请输入银行卡号!' }],
// partNumber: [{ required: true, message: '请输入基本工资!' }],
// description: [{ required: true, message: '请输入工作职位!' }],
// productname: [{ required: true, message: '请输入餐费单价!' }],
// specifications: [{ required: true, message: '请输入社保公司!' }],
// num: [{ required: true, message: '请输入社保个人!' }],
// danwei: [{ required: true, message: '请输入工时单价!' }],
// company: [{ required: true, message: '请输入比例!' }],
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
url: {
add: '/trad/tblTradBase/add',
edit: '/trad/tblTradBase/edit',
queryById: '/trad/tblTradBase/queryById',
},
}
}
},
computed: {
formDisabled() {
return this.disabled
},
},
created() {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model))
},
methods: {
add() {
this.edit(this.modelDefault)
},
edit(record) {
this.model = Object.assign({}, record)
this.visible = true
},
submitForm() {
const that = this
// 触发表单验证
this.$refs.form.validate((valid) => {
if (valid) {
that.confirmLoading = true
let httpurl = ''
let method = ''
if (!this.model.id) {
httpurl += this.url.add
method = 'post'
} else {
httpurl += this.url.edit
method = 'put'
}
httpAction(httpurl, this.model, method)
.then((res) => {
if (res.success) {
that.$message.success(res.message)
that.$emit('ok')
} else {
that.$message.warning(res.message)
}
})
.finally(() => {
that.confirmLoading = false
})
}
})
},
},
}
</script>
\ No newline at end of file
... ...
... ... @@ -17,7 +17,7 @@
<script>
import TblTradBaseForm from '././TblTradBaseForm'
import TblTradBaseForm from './TblTradBaseForm'
export default {
name: 'TblTradBaseModal',
... ...
... ... @@ -14,7 +14,7 @@
<script>
import TblTradBaseForm from '././TblTradBaseForm'
import TblTradBaseForm from './TblTradBaseForm'
export default {
name: 'TblTradBaseModal',
components: {
... ...
... ... @@ -17,7 +17,7 @@
<script>
import TblTradContractForm from '././TblTradContractForm'
import TblTradContractForm from './TblTradContractForm'
export default {
name: 'TblTradContractModal',
... ...
... ... @@ -14,7 +14,7 @@
<script>
import TblTradContractForm from '././TblTradContractForm'
import TblTradContractForm from './TblTradContractForm'
export default {
name: 'TblTradContractModal',
components: {
... ...
... ... @@ -3,21 +3,7 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="送货时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime">
<j-date placeholder="请选择送货时间" v-model="model.deliveryTime" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="交接人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jiaojieren">
<a-input v-model="model.jiaojieren" placeholder="请输入交接人" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="送货单扫描件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="scannedCopies">
<a-input v-model="model.scannedCopies" placeholder="请输入送货单扫描件" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开票时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="invoicingTime">
<j-date placeholder="请选择开票时间" v-model="model.invoicingTime" style="width: 100%" />
... ...
... ... @@ -17,7 +17,7 @@
<script>
import TblTradFphkForm from '././TblTradFphkForm'
import TblTradFphkForm from './TblTradFphkForm'
export default {
name: 'TblTradFphkModal',
... ...
... ... @@ -14,7 +14,7 @@
<script>
import TblTradFphkForm from '././TblTradFphkForm'
import TblTradFphkForm from './TblTradFphkForm'
export default {
name: 'TblTradFphkModal',
components: {
... ...
... ... @@ -17,7 +17,7 @@
<script>
import TblTradInquiryForm from '././TblTradInquiryForm'
import TblTradInquiryForm from './TblTradInquiryForm'
export default {
name: 'TblTradInquiryModal',
... ...
... ... @@ -14,7 +14,7 @@
<script>
import TblTradInquiryForm from '././TblTradInquiryForm'
import TblTradInquiryForm from './TblTradInquiryForm'
export default {
name: 'TblTradInquiryModal',
components: {
... ...
... ... @@ -4,26 +4,6 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="投标价格(不含税)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bidPrice">
<a-input-number v-model="model.bidPrice" placeholder="请输入投标价格(不含税)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中标单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zhongPrice">
<a-input-number v-model="model.zhongPrice" placeholder="请输入中标单价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中标数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zhongNum">
<a-input-number v-model="model.zhongNum" placeholder="请输入中标数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中标总价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalPrice">
<a-input-number v-model="model.totalPrice" placeholder="请输入中标总价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="采购厂商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cgManufacturer">
<a-input v-model="model.cgManufacturer" placeholder="请输入采购厂商" ></a-input>
</a-form-model-item>
... ... @@ -84,6 +64,21 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="送货时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime">
<j-date placeholder="请选择送货时间" v-model="model.deliveryTime" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="交接人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jiaojieren">
<a-input v-model="model.jiaojieren" placeholder="请输入交接人" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="送货单扫描件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="scannedCopies">
<a-input v-model="model.scannedCopies" placeholder="请输入送货单扫描件" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="毛利润" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="profit">
<a-input-number v-model="model.profit" placeholder="请输入毛利润" style="width: 100%" />
</a-form-model-item>
... ...
... ... @@ -17,7 +17,7 @@
<script>
import TblTradTenderForm from '././TblTradTenderForm'
import TblTradTenderForm from './TblTradTenderForm'
export default {
name: 'TblTradTenderModal',
... ...
... ... @@ -14,7 +14,7 @@
<script>
import TblTradTenderForm from '././TblTradTenderForm'
import TblTradTenderForm from './TblTradTenderForm'
export default {
name: 'TblTradTenderModal',
components: {
... ...
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="投标价格(不含税)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bidPrice">
<a-input-number v-model="model.bidPrice" placeholder="请输入投标价格(不含税)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中标单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zhongPrice">
<a-input-number v-model="model.zhongPrice" placeholder="请输入中标单价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中标数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zhongNum">
<a-input-number v-model="model.zhongNum" placeholder="请输入中标数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中标总价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalPrice">
<a-input-number v-model="model.totalPrice" placeholder="请输入中标总价" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TblTradTouForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/trad/tblTradTou/add",
edit: "/trad/tblTradTou/edit",
queryById: "/trad/tblTradTou/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>
\ No newline at end of file
... ...
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tbl-trad-tou-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tbl-trad-tou-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import TblTradTouForm from './TblTradTouForm'
export default {
name: 'TblTradTouModal',
components: {
TblTradTouForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
\ No newline at end of file
... ...
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tbl-trad-tou-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tbl-trad-tou-form>
</j-modal>
</template>
<script>
import TblTradTouForm from './TblTradTouForm'
export default {
name: 'TblTradTouModal',
components: {
TblTradTouForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>
\ No newline at end of file
... ...