物流司机信息,用车需求计算添加提货功能

This commit is contained in:
王帅 2025-04-25 16:16:27 +08:00
parent f2a1e49a1a
commit 4e7cd39330
8 changed files with 809 additions and 3 deletions

View File

@ -0,0 +1,215 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="车牌号">
<a-input placeholder="请输入车牌号" v-model="queryParam.carNum"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="姓名">
<a-input placeholder="请输入姓名" v-model="queryParam.driverName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</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('物流司机信息')">导出</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>
<logistics-driver-modal ref="modalForm" @ok="modalFormOk"></logistics-driver-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import LogisticsDriverModal from './modules/LogisticsDriverModal'
export default {
name: 'LogisticsDriverList',
mixins:[JeecgListMixin, mixinDevice],
components: {
LogisticsDriverModal
},
data () {
return {
description: '物流司机信息管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'物流公司',
align:"center",
dataIndex: 'logistics'
},
{
title:'车牌号',
align:"center",
dataIndex: 'carNum'
},
{
title:'姓名',
align:"center",
dataIndex: 'driverName'
},
{
title:'身份证',
align:"center",
dataIndex: 'driverIdCard'
},
{
title:'电话',
align:"center",
dataIndex: 'driverTel'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/logisticsdriver/logisticsDriver/list",
delete: "/logisticsdriver/logisticsDriver/delete",
deleteBatch: "/logisticsdriver/logisticsDriver/deleteBatch",
exportXlsUrl: "/logisticsdriver/logisticsDriver/exportXls",
importExcelUrl: "logisticsdriver/logisticsDriver/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'logistics',text:'物流公司'})
fieldList.push({type:'string',value:'carNum',text:'车牌号'})
fieldList.push({type:'string',value:'driverName',text:'姓名'})
fieldList.push({type:'string',value:'driverIdCard',text:'身份证'})
fieldList.push({type:'string',value:'driverTel',text:'电话'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

View File

@ -0,0 +1,124 @@
<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="logistics">
<a-input v-model.trim="model.logistics" placeholder="请输入物流公司" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="车牌号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carNum">
<a-input v-model.trim="model.carNum" placeholder="请输入车牌号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="driverName">
<a-input v-model.trim="model.driverName" placeholder="请输入姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="身份证" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="driverIdCard">
<a-input v-model.trim="model.driverIdCard" placeholder="请输入身份证" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="driverTel">
<a-input v-model.trim="model.driverTel" placeholder="请输入电话" ></a-input>
</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: 'LogisticsDriverForm',
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: "/logisticsdriver/logisticsDriver/add",
edit: "/logisticsdriver/logisticsDriver/edit",
queryById: "/logisticsdriver/logisticsDriver/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>

View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<logistics-driver-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></logistics-driver-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 LogisticsDriverForm from './LogisticsDriverForm'
export default {
name: 'LogisticsDriverModal',
components: {
LogisticsDriverForm
},
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>

View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<logistics-driver-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></logistics-driver-form>
</j-modal>
</template>
<script>
import LogisticsDriverForm from './LogisticsDriverForm'
export default {
name: 'LogisticsDriverModal',
components: {
LogisticsDriverForm
},
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>

View File

@ -235,6 +235,21 @@
align:"center",
dataIndex: 'driverTel'
},
{
title:'司机身份证',
align:"center",
dataIndex: 'driverIdCard'
},
{
title:'进厂门',
align:"center",
dataIndex: 'enterFactoryDoor'
},
{
title:'出厂门',
align:"center",
dataIndex: 'exitFactoryDoor'
},
{
title:'当前状态',
align:"center",

View File

@ -124,6 +124,14 @@
<a>删除</a>
</a-popconfirm>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定审核吗?" @confirm="() => handleExamine(record)">
<a>确认审核</a>
</a-popconfirm>
</a-menu-item>
<a-menu-item>
<a @click="handleTake(record)" v-if="record.auditResult == 1">提货</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
@ -132,6 +140,7 @@
</div>
<vehicle-demand-count-modal ref="modalForm" @ok="modalFormOk"></vehicle-demand-count-modal>
<TakeModal ref="takeModal" @ok="takeModalOk"/>
</a-card>
</template>
@ -142,12 +151,14 @@
import { getAction,deleteAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import VehicleDemandCountModal from './modules/VehicleDemandCountModal'
import TakeModal from './modules/TakeModal.vue'
export default {
name: 'VehicleDemandCountList',
mixins:[JeecgListMixin, mixinDevice],
components: {
VehicleDemandCountModal
VehicleDemandCountModal,
TakeModal
},
data () {
return {
@ -229,7 +240,7 @@
title: '操作',
dataIndex: 'action',
align:"center",
// fixed:"right",
fixed:"right",
width:120,
scopedSlots: { customRender: 'action' }
}
@ -241,7 +252,7 @@
exportXlsUrl: "/vehicledemandcount/vehicleDemandCount/exportXls",
importExcelUrl: "vehicledemandcount/vehicleDemandCount/importExcel",
getByVdNo: "vehicledemandcount/vehicleDemandCount/getByVdNo",
handleExamine: "/vehicledemandcount/vehicleDemandCount/handleExamine"
},
dictOptions:{},
superFieldList:[],
@ -290,6 +301,30 @@
//清空列表选中
// this.onClearSelected()
},
// 审核
handleExamine(record){
if(record.auditResult == "1") {
this.$message.warning("已经审核过了!");
return;
}
getAction(this.url.handleExamine, {id:record.id}).then(res => {
if (res.success) {
this.$message.success(res.message);
this.getByVdNo(record.vdNo);
} else {
this.$message.warning(res.message);
}
})
},
// 提货
handleTake(record){
this.$refs.takeModal.edit(record);
this.$refs.takeModal.title = "提货";
this.$refs.takeModal.disableSubmit = false;
},
takeModalOk(){
this.$message.success("操作成功,请到车辆出入厂流程管理中查询数据");
},
loadData(){},
initDictConfig(){
},

View File

@ -0,0 +1,213 @@
<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="8">
<a-form-model-item label="用车需求编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="vdNo">
<a-input v-model="model.vdNo" placeholder="请输入用车需求编号" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="发货类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shipType">
<j-dict-select-tag type="list" v-model="model.shipType" dictCode="ship_type" placeholder="请选择发货类型" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="车型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carType">
<a-input v-model="model.carType" placeholder="请输入车型" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="车长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carLong">
<a-input-number v-model="model.carLong" placeholder="请输入车长" style="width: 100%" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="取货仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pickUpHub">
<a-input v-model="model.pickUpHub" placeholder="请输入取货仓库" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="送货地点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryAddress">
<a-input v-model="model.deliveryAddress" placeholder="请输入送货地点" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="供应商编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierCode">
<a-input v-model.trim="model.supplierCode" placeholder="请输入供应商编码" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="供应商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierName">
<a-input v-model.trim="model.supplierName" placeholder="请输入供应商名称" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="车牌号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carNum">
<a-input v-model.trim="model.carNum" placeholder="请输入车牌号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="物流公司" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="logistics">
<a-auto-complete v-model="model.logistics" placeholder="请输入物流公司" @select="logisticsSelect" @change="logisticsChange" :dataSource="logisticsList"></a-auto-complete>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="driverName">
<a-input v-model.trim="model.driverName" placeholder="请输入姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="身份证" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="driverIdCard">
<a-input v-model.trim="model.driverIdCard" placeholder="请输入身份证" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="driverTel">
<a-input v-model.trim="model.driverTel" placeholder="请输入电话" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="预计到达" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="etaTime">
<j-date v-model="model.etaTime" placeholder="请选择时间" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;"></j-date>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="进厂门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterFactoryDoor">
<a-input v-model.trim="model.enterFactoryDoor" placeholder="请输入进厂门" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="出厂门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="exitFactoryDoor">
<a-input v-model.trim="model.exitFactoryDoor" placeholder="请输入出厂门" ></a-input>
</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: 'TakeForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
driverInfoList:[],
logisticsList:[],
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
vdNo :[{required: true, message: '请选择用车需求编号!'}],
shipType :[{required: true, message: '请选择发货类型!'}],
carType :[{required: true, message: '请选择车型!'}],
carLong :[{required: true, message: '请选择车长!'}],
pickUpHub :[{required: true, message: '请选择取货仓库!'}],
deliveryAddress :[{required: true, message: '请选择送货地点!'}],
supplierCode :[{required: true, message: '请选择供应商编码!'}],
carNum :[{required: true, message: '请输入车牌号!'}],
logistics :[{required: true, message: '请输入物流公司!'}],
driverName :[{required: true, message: '请输入司机姓名!'}],
driverIdCard :[{required: true, message: '请输入身份证!'}],
driverTel :[{required: true, message: '请输入电话!'}],
etaTime :[{required: true, message: '请选择时间!'}],
},
url: {
add: "/vehicledemandcount/vehicleDemandCount/add",
take: "/vehicleinout/vehicleInOut/take",
queryById: "/vehicledemandcount/vehicleDemandCount/queryById",
getDriverInfo: "/logisticsdriver/logisticsDriver/getDriverInfo"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.getDriverInfo();
},
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) {
// 入厂类型: 提货
this.model.efType = '1';
httpAction(this.url.take,this.model,'post').then((res)=>{
if(res.success){
// that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
getDriverInfo(){
getAction(this.url.getDriverInfo).then(res => {
if (res.success) {
this.driverInfoList = res.result;
this.logisticsList = res.result;
}
})
},
logisticsSelect(){
let logistics = this.logisticsList.filter(x=>x.includes(this.model.logistics))[0].split('&-')[0];
let carNum = this.logisticsList.filter(x=>x.includes(this.model.logistics))[0].split('&-')[1];
let driverName = this.logisticsList.filter(x=>x.includes(this.model.logistics))[0].split('&-')[2];
let driverTel = this.logisticsList.filter(x=>x.includes(this.model.logistics))[0].split('&-')[3];
let driverIdCard = this.logisticsList.filter(x=>x.includes(this.model.logistics))[0].split('&-')[4];
this.model.logistics = logistics;
this.model.carNum = carNum;
this.model.driverName = driverName;
this.model.driverTel = driverTel;
this.model.driverIdCard = driverIdCard;
},
logisticsChange(val){
this.logisticsList = this.driverInfoList.filter(x => x.includes(val));
},
}
}
</script>

View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<take-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></take-form>
</j-modal>
</template>
<script>
import TakeForm from './TakeForm'
export default {
name: 'TakeModal',
components: {
TakeForm
},
data () {
return {
title:'',
width:1200,
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(val){
this.$emit('ok',val);
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>