<template>
|
<el-dialog
|
top="10vh"
|
width="20%"
|
title="拉取销售订单"
|
:close-on-click-modal="false"
|
:visible.sync="visible"
|
>
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" class="l-mes">
|
<el-form-item label="日期">
|
<el-date-picker
|
v-model="dataForm.selectTime"
|
type="datetime"
|
placeholder="选择日期时间"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
<el-button type="info" @click="visible = false">取消</el-button>
|
<el-button
|
type="primary"
|
:disabled="isSubmit"
|
v-thinclick="`dataFormSubmit`"
|
>确定</el-button
|
>
|
</div>
|
</el-dialog>
|
</template>
|
|
<script>
|
import { otcCustomerOrderSync } from '@/api/plan/customerorder'
|
|
export default {
|
data() {
|
return {
|
visible: true,
|
dataForm: {
|
selectTime: null
|
},
|
dataRule: {},
|
isSubmit: false
|
}
|
},
|
methods: {
|
init() {
|
this.visible = true
|
},
|
dataFormSubmit() {
|
this.isSubmit = true
|
if (this.dataForm.selectTime != null && this.dataForm.selectTime != '') {
|
otcCustomerOrderSync({
|
selectTime: this.dataForm.selectTime,
|
orderNo: ''
|
})
|
.then((response) => {
|
const resData = response.data
|
if (resData.code === 0) {
|
this.$message.success('拉取销售订单成功;' + resData.msg)
|
this.visible = false
|
this.isSubmit = false
|
this.dataForm.selectTime = null
|
this.$emit('refreshDataList')
|
} else {
|
this.$message.success('拉取销售订单失败')
|
this.isSubmit = false
|
}
|
})
|
.catch((error) => {
|
this.isSubmit = false
|
console.log(error)
|
})
|
} else {
|
this.isSubmit = false
|
this.$message.error('请先选择日期')
|
}
|
}
|
}
|
}
|
</script>
|
<style scoped>
|
.mps-table .el-table__row > td {
|
border: none;
|
}
|
|
.mps-table::before {
|
height: 0px;
|
}
|
/*
|
字符串过长时,隐藏显示省略号
|
*/
|
.inline-el-hidden {
|
display: block;
|
width: 93%;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
margin: 0 auto;
|
}
|
</style>
|